SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/R/ddenseMatrix.R
ViewVC logotype

Diff of /pkg/Matrix/R/ddenseMatrix.R

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

revision 3000, Tue Aug 12 10:29:50 2014 UTC revision 3018, Sat Oct 11 17:52:10 2014 UTC
# Line 31  Line 31 
31    
32  setAs("matrix", "CsparseMatrix",  setAs("matrix", "CsparseMatrix",
33        function(from) .Call(dense_to_Csparse, from))        function(from) .Call(dense_to_Csparse, from))
 ##       function(from) {  
 ##          if(is.numeric(from))  
 ##              .Call(dense_to_Csparse, .Call(dup_mMatrix_as_dgeMatrix, from))  
 ##          else if(is.logical(from)) ## FIXME: this works, but maybe wastefully  
 ##                 as(Matrix(from, sparse=TRUE), "CsparseMatrix")  
 ##          else stop('not-yet-implemented coercion to "CsparseMatrix"')  
 ##       })  
34    
35    ## for historical i.e. backcompatibility reasons ..
 ## special case needed in the Matrix function  
36  setAs("matrix", "dgCMatrix",  setAs("matrix", "dgCMatrix",
37        function(from) {        function(from) {
38            storage.mode(from) <- "double"            storage.mode(from) <- "double"

Legend:
Removed from v.3000  
changed lines
  Added in v.3018

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