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 1059, Wed Nov 23 22:20:13 2005 UTC revision 1067, Mon Nov 28 16:27:29 2005 UTC
# Line 79  Line 79 
79      return chm_dense_to_SEXP(chc, 1);      return chm_dense_to_SEXP(chc, 1);
80  }  }
81    
82    SEXP Csparse_dense_crossprod(SEXP a, SEXP b)
83    {
84        cholmod_sparse *cha = as_cholmod_sparse(a);
85        cholmod_dense *chb = as_cholmod_dense(b);
86        cholmod_dense *chc = cholmod_allocate_dense(cha->ncol, chb->ncol,
87                                                    cha->ncol, chb->xtype, &c);
88        double alpha = 1, beta = 0;
89    
90        cholmod_sdmult(cha, 1, &alpha, &beta, chb, chc, &c);
91        Free(cha); Free(chb);
92        return chm_dense_to_SEXP(chc, 1);
93    }
94    
95  SEXP Csparse_crossprod(SEXP x, SEXP trans, SEXP triplet)  SEXP Csparse_crossprod(SEXP x, SEXP trans, SEXP triplet)
96  {  {
97      int trip = asLogical(triplet),      int trip = asLogical(triplet),

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

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