SCM

SCM Repository

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

Diff of /pkg/src/dsCMatrix.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 26  Line 26 
26      L = cholmod_factor_to_sparse(Ncp, &c); cholmod_free_factor(&Ncp, &c);      L = cholmod_factor_to_sparse(Ncp, &c); cholmod_free_factor(&Ncp, &c);
27      R = cholmod_transpose(L, /*values*/ 1, &c); cholmod_free_sparse(&L, &c);      R = cholmod_transpose(L, /*values*/ 1, &c); cholmod_free_sparse(&L, &c);
28      ans = PROTECT(chm_sparse_to_SEXP(R, /*cholmod_free*/ 1,      ans = PROTECT(chm_sparse_to_SEXP(R, /*cholmod_free*/ 1,
29                                       /*uploT*/ 1, /*diag*/ "N",                                       /*uploT*/ 1, /*Rkind*/ 0, /*diag*/ "N",
30                                       GET_SLOT(x, Matrix_DimNamesSym)));                                       GET_SLOT(x, Matrix_DimNamesSym)));
31      if (asLogical(pivot)) {      if (asLogical(pivot)) {
32          SEXP piv = PROTECT(allocVector(INTSXP, N->n));          SEXP piv = PROTECT(allocVector(INTSXP, N->n));
# Line 126  Line 126 
126      cx = cholmod_solve(CHOLMOD_A, L, cb, &c);      cx = cholmod_solve(CHOLMOD_A, L, cb, &c);
127      Free(cb); Free(L);      Free(cb); Free(L);
128      UNPROTECT(1);      UNPROTECT(1);
129      return chm_dense_to_SEXP(cx, 1);      return chm_dense_to_SEXP(cx, 1, 0);
130  }  }
131    
132  /* Needed for printing dsCMatrix objects */  /* Needed for printing dsCMatrix objects */
# Line 140  Line 140 
140      if (!A->stype)      if (!A->stype)
141          error("Non-symmetric matrix passed to dsCMatrix_to_dgTMatrix");          error("Non-symmetric matrix passed to dsCMatrix_to_dgTMatrix");
142      Free(A); cholmod_free_sparse(&Afull, &c);      Free(A); cholmod_free_sparse(&Afull, &c);
143      return chm_triplet_to_SEXP(At, 1, /*uploT*/ 0, "",      return chm_triplet_to_SEXP(At, 1, /*uploT*/ 0, /*Rkind*/ 0, "",
144                                 GET_SLOT(x, Matrix_DimNamesSym));                                 GET_SLOT(x, Matrix_DimNamesSym));
145  }  }
146    

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