SCM

SCM Repository

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

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

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

revision 2220, Thu Jul 17 21:37:21 2008 UTC revision 2227, Mon Jul 21 19:49:33 2008 UTC
# Line 80  Line 80 
80  {  {
81      int cl = asLogical(classed);      int cl = asLogical(classed);
82      SEXP ans = PROTECT(NEW_OBJECT(MAKE_CLASS("dgeMatrix")));      SEXP ans = PROTECT(NEW_OBJECT(MAKE_CLASS("dgeMatrix")));
83      CSP A = AS_CSP(Csparse_diagU2N(a));      CSP A = AS_CSP(a);
84      int *adims = INTEGER(GET_SLOT(a, Matrix_DimSym)),      int *adims = INTEGER(GET_SLOT(a, Matrix_DimSym)),
85          *bdims = INTEGER(cl ? GET_SLOT(b, Matrix_DimSym) :          *bdims = INTEGER(cl ? GET_SLOT(b, Matrix_DimSym) :
86                           getAttrib(b, R_DimSymbol));                           getAttrib(b, R_DimSymbol));
# Line 103  Line 103 
103  SEXP dtCMatrix_sparse_solve(SEXP a, SEXP b)  SEXP dtCMatrix_sparse_solve(SEXP a, SEXP b)
104  {  {
105      SEXP ans = PROTECT(NEW_OBJECT(MAKE_CLASS("dgCMatrix")));      SEXP ans = PROTECT(NEW_OBJECT(MAKE_CLASS("dgCMatrix")));
106      CSP A = AS_CSP(Csparse_diagU2N(a)), B = AS_CSP(Csparse_diagU2N(b));      CSP A = AS_CSP(a), B = AS_CSP(b);
107      int *xp = INTEGER(ALLOC_SLOT(ans, Matrix_pSym, INTSXP, (B->n) + 1)),      int *xp = INTEGER(ALLOC_SLOT(ans, Matrix_pSym, INTSXP, (B->n) + 1)),
108          xnz = 10 * B->p[B->n];  /* initial estimate of nnz in x */          xnz = 10 * B->p[B->n];  /* initial estimate of nnz in x */
109      int *ti = Calloc(xnz, int), k, lo = uplo_P(a)[0] == 'L', pos = 0;      int *ti = Calloc(xnz, int), k, lo = uplo_P(a)[0] == 'L', pos = 0;

Legend:
Removed from v.2220  
changed lines
  Added in v.2227

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