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 1866, Mon Jun 4 17:11:11 2007 UTC revision 1867, Mon Jun 4 17:13:02 2007 UTC
# Line 35  Line 35 
35  {  {
36      cholmod_triplet *chxt = as_cholmod_triplet(x);      cholmod_triplet *chxt = as_cholmod_triplet(x);
37      cholmod_sparse *chxs = cholmod_triplet_to_sparse(chxt, chxt->nnz, &c);      cholmod_sparse *chxs = cholmod_triplet_to_sparse(chxt, chxt->nnz, &c);
38      int uploT = 0; char *diag = "";      int tr = asLogical(tri);
39      int Rkind = (chxt->xtype != CHOLMOD_PATTERN) ? Real_kind(x) : 0;      int Rkind = (chxt->xtype != CHOLMOD_PATTERN) ? Real_kind(x) : 0;
40    
41      Free(chxt);      Free(chxt);
42      if (asLogical(tri)) {       /* triangular sparse matrices */      return chm_sparse_to_SEXP(chxs, 1,
43          uploT = (strcmp(CHAR(asChar(GET_SLOT(x, Matrix_uploSym))), "U")) ?                                tr ? ((*uplo_P(x) == 'U') ? 1 : -1) : 0,
44              -1 : 1;                                Rkind, tr ? diag_P(x) : "",
         diag = CHAR(asChar(GET_SLOT(x, Matrix_diagSym)));  
     }  
     return chm_sparse_to_SEXP(chxs, 1, uploT, Rkind, diag,  
45                                GET_SLOT(x, Matrix_DimNamesSym));                                GET_SLOT(x, Matrix_DimNamesSym));
46  }  }
   

Legend:
Removed from v.1866  
changed lines
  Added in v.1867

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge