SCM

SCM Repository

[matrix] Diff of /pkg/R/dgCMatrix.R
ViewVC logotype

Diff of /pkg/R/dgCMatrix.R

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

revision 1547, Mon Sep 11 14:49:39 2006 UTC revision 1548, Mon Sep 11 22:13:07 2006 UTC
# Line 13  Line 13 
13  ## rather use Csparse* to lsparse* in ./lsparseMatrix.R ,  ## rather use Csparse* to lsparse* in ./lsparseMatrix.R ,
14  ## but this is for "back-compatibility" (have had tests for it..):  ## but this is for "back-compatibility" (have had tests for it..):
15    
16    setAs("dgCMatrix", "ngCMatrix",
17          function(from) .Call(Csparse_to_nz_pattern, from, FALSE))
18    
19  setAs("dgCMatrix", "lgCMatrix",  setAs("dgCMatrix", "lgCMatrix",
20        function(from) .Call(Csparse_to_logical, from,        function(from) { ## FIXME use .Call() too!
21                             is(from, "triangularMatrix")))            r <- new("lgCMatrix")
22              r@x <- as.logical(from@x)
23              ## and copy the other slots
24              for(nm in c("i", "p", "Dim", "Dimnames"))
25                  slot(r, nm) <- slot(from, nm)
26              r
27          })
28    
29  setMethod("image", "dgCMatrix",  setMethod("image", "dgCMatrix",
30            function(x, ...) {            function(x, ...) {

Legend:
Removed from v.1547  
changed lines
  Added in v.1548

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