SCM

SCM Repository

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

Diff of /pkg/src/sscCrosstab.c

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

revision 478, Wed Feb 2 14:33:51 2005 UTC revision 488, Wed Feb 2 19:11:51 2005 UTC
# Line 59  Line 59 
59      }      }
60      SET_SLOT(val, Matrix_pSym, allocVector(INTSXP, ncol + 1));      SET_SLOT(val, Matrix_pSym, allocVector(INTSXP, ncol + 1));
61      Ap = INTEGER(GET_SLOT(val, Matrix_pSym));      Ap = INTEGER(GET_SLOT(val, Matrix_pSym));
62      dgTMatrix_to_dgCMatrix(ncol, ncol, ntrpl, Ti, Tj, Tx, Ap, TTi, TTx);      triplet_to_col(ncol, ncol, ntrpl, Ti, Tj, Tx, Ap, TTi, TTx);
63      nz = Ap[ncol];              /* non-zeros in Z'Z crosstab */      nz = Ap[ncol];              /* non-zeros in Z'Z crosstab */
64      SET_SLOT(val, Matrix_iSym, allocVector(INTSXP, nz));      SET_SLOT(val, Matrix_iSym, allocVector(INTSXP, nz));
65      SET_SLOT(val, Matrix_xSym, allocVector(REALSXP, nz));      SET_SLOT(val, Matrix_xSym, allocVector(REALSXP, nz));
# Line 115  Line 115 
115                  }                  }
116              }              }
117          }          }
118          dgTMatrix_to_dgCMatrix(n, n, nnz, TTi, Tj, (double *) NULL,          triplet_to_col(n, n, nnz, TTi, Tj, (double *) NULL,
119                         Ap, Ai, (double *) NULL);                         Ap, Ai, (double *) NULL);
120          ssc_metis_order(n, Ap, Ai, perm, iperm);          ssc_metis_order(n, Ap, Ai, perm, iperm);
121          for (j = j1; j < i2; j++) ans[j] = j1 + iperm[j - j1];          for (j = j1; j < i2; j++) ans[j] = j1 + iperm[j - j1];
# Line 243  Line 243 
243                  }                  }
244              }              }
245          }          }
246          dgTMatrix_to_dgCMatrix(n, n, nnz, TTi, Tj, (double *) NULL,          triplet_to_col(n, n, nnz, TTi, Tj, (double *) NULL,
247                         AAp, AAi, (double *) NULL);                         AAp, AAi, (double *) NULL);
248          nz = AAp[n];          nz = AAp[n];
249          SET_SLOT(ans, Matrix_iSym, allocVector(INTSXP, nz));          SET_SLOT(ans, Matrix_iSym, allocVector(INTSXP, nz));

Legend:
Removed from v.478  
changed lines
  Added in v.488

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