SCM

SCM Repository

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

Diff of /pkg/src/Csparse.c

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

revision 1067, Mon Nov 28 16:27:29 2005 UTC revision 1141, Thu Jan 12 03:02:46 2006 UTC
# Line 34  Line 34 
34      cholmod_sparse *chxs = as_cholmod_sparse(x);      cholmod_sparse *chxs = as_cholmod_sparse(x);
35      cholmod_dense *chxd = cholmod_sparse_to_dense(chxs, &c);      cholmod_dense *chxd = cholmod_sparse_to_dense(chxs, &c);
36    
37      free(chxs);      Free(chxs);
38      return chm_dense_to_SEXP(chxd, 1);      return chm_dense_to_SEXP(chxd, 1);
39  }  }
40    
# Line 43  Line 43 
43      cholmod_sparse *chxs = as_cholmod_sparse(x);      cholmod_sparse *chxs = as_cholmod_sparse(x);
44      cholmod_triplet *chxt = cholmod_sparse_to_triplet(chxs, &c);      cholmod_triplet *chxt = cholmod_sparse_to_triplet(chxs, &c);
45    
46      free(chxs);      Free(chxs);
47      return chm_triplet_to_SEXP(chxt, 1);      return chm_triplet_to_SEXP(chxt, 1);
48  }  }
49    
# Line 52  Line 52 
52      cholmod_sparse *chx = as_cholmod_sparse(x);      cholmod_sparse *chx = as_cholmod_sparse(x);
53      cholmod_sparse *chxt = cholmod_transpose(chx, (int) chx->xtype, &c);      cholmod_sparse *chxt = cholmod_transpose(chx, (int) chx->xtype, &c);
54    
55      free(chx);      Free(chx);
56      return chm_sparse_to_SEXP(chxt, 1);      return chm_sparse_to_SEXP(chxt, 1);
57  }  }
58    
# Line 62  Line 62 
62          *chb = as_cholmod_sparse(b);          *chb = as_cholmod_sparse(b);
63      cholmod_sparse *chc = cholmod_ssmult(cha, chb, 0, cha->xtype, 1, &c);      cholmod_sparse *chc = cholmod_ssmult(cha, chb, 0, cha->xtype, 1, &c);
64    
65      free(cha); free(chb);      Free(cha); Free(chb);
66      return chm_sparse_to_SEXP(chc, 1);      return chm_sparse_to_SEXP(chc, 1);
67  }  }
68    
# Line 75  Line 75 
75      double alpha = 1, beta = 0;      double alpha = 1, beta = 0;
76    
77      cholmod_sdmult(cha, 0, &alpha, &beta, chb, chc, &c);      cholmod_sdmult(cha, 0, &alpha, &beta, chb, chc, &c);
78      free(cha); free(chb);      Free(cha); Free(chb);
79      return chm_dense_to_SEXP(chc, 1);      return chm_dense_to_SEXP(chc, 1);
80  }  }
81    
# Line 110  Line 110 
110    
111      if (trip) {      if (trip) {
112          cholmod_free_sparse(&chx, &c);          cholmod_free_sparse(&chx, &c);
113          free(cht);          Free(cht);
114      } else {      } else {
115          free(chx);          Free(chx);
116      }      }
117      if (!tr) cholmod_free_sparse(&chxt, &c);      if (!tr) cholmod_free_sparse(&chxt, &c);
118      return chm_sparse_to_SEXP(chcp, 1);      return chm_sparse_to_SEXP(chcp, 1);

Legend:
Removed from v.1067  
changed lines
  Added in v.1141

root@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