SCM

SCM Repository

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

Diff of /pkg/src/bCrosstab.c

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

revision 464, Sat Jan 29 14:12:53 2005 UTC revision 478, Wed Feb 2 14:33:51 2005 UTC
# Line 275  Line 275 
275              int rr = ci[j] + 1;              int rr = ci[j] + 1;
276              if (rr > cnr) cnr = rr;              if (rr > cnr) cnr = rr;
277          }          }
278          triplet_to_col(cnr, anc, ntot, Ti, Tj, (double *) NULL,          dgTMatrix_to_dgCMatrix(cnr, anc, ntot, Ti, Tj, (double *) NULL,
279                         INTEGER(cpp), Ci, (double *) NULL);                         INTEGER(cpp), Ci, (double *) NULL);
280          cnz = cp[anc];          cnz = cp[anc];
281          SET_SLOT(C, Matrix_iSym, allocVector(INTSXP, cnz));          SET_SLOT(C, Matrix_iSym, allocVector(INTSXP, cnz));
# Line 359  Line 359 
359          /* Determine maximum row index in T */          /* Determine maximum row index in T */
360          tnr = -1; for (jj = 0; jj < ntot; jj++) if (Ti[jj] > tnr) tnr = Ti[jj];          tnr = -1; for (jj = 0; jj < ntot; jj++) if (Ti[jj] > tnr) tnr = Ti[jj];
361          tnr++;                  /* increment by 1 to get number of rows */          tnr++;                  /* increment by 1 to get number of rows */
362          triplet_to_col(tnr, tnc, ntot, Ti, Tj, (double *) NULL,          dgTMatrix_to_dgCMatrix(tnr, tnc, ntot, Ti, Tj, (double *) NULL,
363                         tp, Ai, (double *) NULL);                         tp, Ai, (double *) NULL);
364          nnz = tp[tnc];          nnz = tp[tnc];
365          SET_SLOT(tb, Matrix_iSym, allocVector(INTSXP, nnz));          SET_SLOT(tb, Matrix_iSym, allocVector(INTSXP, nnz));
# Line 403  Line 403 
403          if (j <= jj) ind_permute(mi, nnz, iperm);          if (j <= jj) ind_permute(mi, nnz, iperm);
404          if (j >= jj) ind_permute(mj, nnz, iperm);          if (j >= jj) ind_permute(mj, nnz, iperm);
405          if (j == jj) make_upper_triangular(mi, mj, nnz);          if (j == jj) make_upper_triangular(mi, mj, nnz);
406          triplet_to_col(nrow, ncol, nnz, mi, mj, mx, cp, INTEGER(cscbi), cx);          dgTMatrix_to_dgCMatrix(nrow, ncol, nnz, mi, mj, mx, cp, INTEGER(cscbi), cx);
407          Free(mi); Free(mj); Free(mx);          Free(mi); Free(mj); Free(mx);
408      }      }
409  }  }
# Line 422  Line 422 
422      ind_permute(mi, nnz, iperm);      ind_permute(mi, nnz, iperm);
423      ind_permute(mj, nnz, iperm);      ind_permute(mj, nnz, iperm);
424      make_upper_triangular(mi, mj, nnz);      make_upper_triangular(mi, mj, nnz);
425      triplet_to_col(nlev, nlev, nnz, mi, mj, mx, Ap, INTEGER(AiP), Ax);      dgTMatrix_to_dgCMatrix(nlev, nlev, nnz, mi, mj, mx, Ap, INTEGER(AiP), Ax);
426      Free(mi); Free(mj); Free(mx);      Free(mi); Free(mj); Free(mx);
427  }  }
428    

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

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