SCM

SCM Repository

[matrix] Diff of /pkg/src/Tsparse.c
ViewVC logotype

Diff of /pkg/src/Tsparse.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1547, Mon Sep 11 14:49:39 2006 UTC revision 1548, Mon Sep 11 22:13:07 2006 UTC
# Line 33  Line 33 
33      cholmod_triplet *chxt = as_cholmod_triplet(x);      cholmod_triplet *chxt = as_cholmod_triplet(x);
34      cholmod_sparse *chxs = cholmod_triplet_to_sparse(chxt, chxt->nnz, &c);      cholmod_sparse *chxs = cholmod_triplet_to_sparse(chxt, chxt->nnz, &c);
35      int uploT = 0; char *diag = "";      int uploT = 0; char *diag = "";
36        int Rkind = (chxt->xtype == CHOLMOD_REAL) ? Real_kind(x) : 0;
37    
38      Free(chxt);      Free(chxt);
39      if (asLogical(tri)) {       /* triangular sparse matrices */      if (asLogical(tri)) {       /* triangular sparse matrices */
# Line 40  Line 41 
41              -1 : 1;              -1 : 1;
42          diag = CHAR(asChar(GET_SLOT(x, Matrix_diagSym)));          diag = CHAR(asChar(GET_SLOT(x, Matrix_diagSym)));
43      }      }
44      return chm_sparse_to_SEXP(chxs, 1, uploT, diag,      return chm_sparse_to_SEXP(chxs, 1, uploT, Rkind, diag,
45                                duplicate(GET_SLOT(x, Matrix_DimNamesSym)));                                duplicate(GET_SLOT(x, Matrix_DimNamesSym)));
46  }  }
47    

Legend:
Removed from v.1547  
changed lines
  Added in v.1548

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge