SCM

SCM Repository

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

Diff of /pkg/Matrix/R/nsCMatrix.R

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

revision 2627, Mon Dec 6 14:33:15 2010 UTC revision 2628, Sat Dec 11 16:56:51 2010 UTC
# Line 13  Line 13 
13  setAs("nsCMatrix", "nsTMatrix",  setAs("nsCMatrix", "nsTMatrix",
14        function(from) .Call(Csparse_to_Tsparse, from, FALSE))        function(from) .Call(Csparse_to_Tsparse, from, FALSE))
15    
16  .nsC2d <- function(from)  ## --- these now happen using  "nCsparseMatrix" -- in ./ngCMatrix.R
17      new("dsCMatrix", i = from@i, p = from@p,  ##
18          x = rep.int(1, length(from@i)), uplo = from@uplo,  ## .nsC2d <- function(from)
19          Dim = from@Dim, Dimnames = from@Dimnames)  ##     new("dsCMatrix", i = from@i, p = from@p,
20    ##      x = rep.int(1, length(from@i)), uplo = from@uplo,
21    ##      Dim = from@Dim, Dimnames = from@Dimnames)
22    
23    ## .nsC2l <- function(from)
24    ##     new("lsCMatrix", i = from@i, p = from@p,
25    ##      x = rep.int(TRUE, length(from@i)), uplo = from@uplo,
26    ##      Dim = from@Dim, Dimnames = from@Dimnames)
27    
28    ## Not needed, once we use "nCsparseMatrix" (-> ./ngCMatrix.R ):
29    setAs("nsCMatrix", "dMatrix", nC2d)
30    setAs("nsCMatrix", "dsparseMatrix", nC2d)
31    setAs("nsCMatrix", "dsCMatrix", nC2d)
32    ##
33    setAs("nsCMatrix", "lMatrix", nC2l)
34    setAs("nsCMatrix", "lsparseMatrix", nC2l)
35    setAs("nsCMatrix", "lsCMatrix", nC2l)
36    
37  .nsC2l <- function(from)  ## rm(.nsC2d,.nsC2l) # don't even keep "hidden"
     new("lsCMatrix", i = from@i, p = from@p,  
         x = rep.int(TRUE, length(from@i)), uplo = from@uplo,  
         Dim = from@Dim, Dimnames = from@Dimnames)  
   
 setAs("nsCMatrix", "dsCMatrix", .nsC2d)  
 setAs("nsCMatrix", "dMatrix", .nsC2d)  
 setAs("nsCMatrix", "dsparseMatrix", .nsC2d)  
   
 setAs("nsCMatrix", "lsCMatrix", .nsC2l)  
 setAs("nsCMatrix", "lMatrix", .nsC2l)  
 setAs("nsCMatrix", "lsparseMatrix", .nsC2l)  
   
 rm(.nsC2d,.nsC2l) # don't even keep "hidden"  
38    
39  ## have rather tril() and triu() methods than  ## have rather tril() and triu() methods than
40  ## setAs("nsCMatrix", "ntCMatrix", ....)  ## setAs("nsCMatrix", "ntCMatrix", ....)

Legend:
Removed from v.2627  
changed lines
  Added in v.2628

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