SCM

SCM Repository

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

Diff of /pkg/Matrix/src/Csparse.c

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

revision 1660, Thu Nov 2 11:05:35 2006 UTC revision 1708, Fri Dec 22 19:53:37 2006 UTC
# Line 312  Line 312 
312    
313  SEXP Csparse_diagU2N(SEXP x)  SEXP Csparse_diagU2N(SEXP x)
314  {  {
315        if (*diag_P(x) != 'U') {/* "trivially fast" when there's no 'diag' slot at all */
316            return (x);
317        }
318        else {
319      cholmod_sparse *chx = as_cholmod_sparse(x);      cholmod_sparse *chx = as_cholmod_sparse(x);
320      cholmod_sparse *eye = cholmod_speye(chx->nrow, chx->ncol, chx->xtype, &c);      cholmod_sparse *eye = cholmod_speye(chx->nrow, chx->ncol, chx->xtype, &c);
321      double one[] = {1, 0};      double one[] = {1, 0};
# Line 324  Line 328 
328      return chm_sparse_to_SEXP(ans, 1, uploT, Rkind, "N",      return chm_sparse_to_SEXP(ans, 1, uploT, Rkind, "N",
329                                duplicate(GET_SLOT(x, Matrix_DimNamesSym)));                                duplicate(GET_SLOT(x, Matrix_DimNamesSym)));
330  }  }
331    }
332    
333  SEXP Csparse_submatrix(SEXP x, SEXP i, SEXP j)  SEXP Csparse_submatrix(SEXP x, SEXP i, SEXP j)
334  {  {

Legend:
Removed from v.1660  
changed lines
  Added in v.1708

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