SCM

SCM Repository

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

Diff of /pkg/src/cscMatrix.c

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

revision 332, Fri Nov 12 21:04:36 2004 UTC revision 371, Sun Dec 5 13:52:25 2004 UTC
# Line 104  Line 104 
104  SEXP csc_tcrossprod(SEXP x)  SEXP csc_tcrossprod(SEXP x)
105  {  {
106      SEXP pslot = GET_SLOT(x, Matrix_pSym),      SEXP pslot = GET_SLOT(x, Matrix_pSym),
107          ans = PROTECT(NEW_OBJECT(MAKE_CLASS("sscMatrix"))), tmp;          ans = PROTECT(NEW_OBJECT(MAKE_CLASS("sscMatrix")));
108      int *xp = INTEGER(pslot),      int *xp = INTEGER(pslot),
109          *xi = INTEGER(GET_SLOT(x, Matrix_iSym)),          *xi = INTEGER(GET_SLOT(x, Matrix_iSym)),
110          *dims = INTEGER(GET_SLOT(x, Matrix_DimSym));          *dims = INTEGER(GET_SLOT(x, Matrix_DimSym));
# Line 416  Line 416 
416          error("perm must be an integer vector of length %d",          error("perm must be an integer vector of length %d",
417                ncol);                ncol);
418      prm = INTEGER(perm);      prm = INTEGER(perm);
419      iperm = Calloc(ncol, int);      if (!R_ldl_valid_perm(ncol, prm))
     if (!ldl_valid_perm(ncol, prm, iperm))  
420          error("perm is not a valid 0-based permutation");          error("perm is not a valid 0-based permutation");
421        iperm = Calloc(ncol, int);
422      for (j = 0; j < ncol; j++) iperm[prm[j]] = j;      for (j = 0; j < ncol; j++) iperm[prm[j]] = j;
423      tmp = GET_SLOT(x, Matrix_pSym);      tmp = GET_SLOT(x, Matrix_pSym);
424      xp = INTEGER(tmp);      xp = INTEGER(tmp);

Legend:
Removed from v.332  
changed lines
  Added in v.371

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