SCM

SCM Repository

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

Diff of /pkg/Matrix/R/ntCMatrix.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 12  Line 12 
12        function(from) copyClass(diagU2N(from), "ngCMatrix"))        function(from) copyClass(diagU2N(from), "ngCMatrix"))
13    
14    
15  .ntC2d <- function(from)  ## --- these now happen using  "nCsparseMatrix" -- in ./ngCMatrix.R
16      new("dtCMatrix", i = from@i, p = from@p,  ##
17          x = rep.int(1, length(from@i)), uplo = from@uplo,  ## .ntC2d <- function(from)
18          diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames)  ##     new("dtCMatrix", i = from@i, p = from@p,
19    ##      x = rep.int(1, length(from@i)), uplo = from@uplo,
20  .ntC2l <- function(from)  ##      diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames)
21      new("ltCMatrix", i = from@i, p = from@p,  
22          x = rep.int(TRUE, length(from@i)), uplo = from@uplo,  ## .ntC2l <- function(from)
23          diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames)  ##     new("ltCMatrix", i = from@i, p = from@p,
24    ##      x = rep.int(TRUE, length(from@i)), uplo = from@uplo,
25  setAs("ntCMatrix", "dMatrix", .ntC2d)# < instead of "dtCMatrix"  ##      diag = from@diag, Dim = from@Dim, Dimnames = from@Dimnames)
26  setAs("ntCMatrix", "dsparseMatrix", .ntC2d)  
27  setAs("ntCMatrix", "dtCMatrix", .ntC2d)  ## Not needed, once we use "nCsparseMatrix" (-> ./ngCMatrix.R ):
28    setAs("ntCMatrix", "dMatrix", nC2d)
29  setAs("ntCMatrix", "lMatrix", .ntC2l)  setAs("ntCMatrix", "dsparseMatrix", nC2d)
30  setAs("ntCMatrix", "lsparseMatrix", .ntC2l)  setAs("ntCMatrix", "dtCMatrix", nC2d)
31  setAs("ntCMatrix", "ltCMatrix", .ntC2l)  ##
32    setAs("ntCMatrix", "lMatrix", nC2l)
33    setAs("ntCMatrix", "lsparseMatrix", nC2l)
34    setAs("ntCMatrix", "ltCMatrix", nC2l)
35    
36  rm(.ntC2d,.ntC2l) # don't even keep "hidden"  ## rm(.ntC2d,.ntC2l) # don't even keep "hidden"
37    
38  setAs("ngCMatrix", "ntCMatrix", # to triangular, needed for triu,..  setAs("ngCMatrix", "ntCMatrix", # to triangular, needed for triu,..
39        function(from) as(as(as(from, "TsparseMatrix"),        function(from) as(as(as(from, "TsparseMatrix"),

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