SCM

SCM Repository

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

Diff of /pkg/R/lsCMatrix.R

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

revision 729, Tue May 17 17:16:39 2005 UTC revision 946, Wed Sep 28 08:56:42 2005 UTC
# Line 2  Line 2 
2    
3  ### contains = "lsparseMatrix"  ### contains = "lsparseMatrix"
4    
5    setAs("lsCMatrix", "matrix",
6          function(from) as(as(from, "lgCMatrix"), "matrix"))
7    
8    setAs("lsCMatrix", "lgCMatrix",
9          function(from) .Call("sCMatrix_to_gCMatrix", from, PACKAGE = "Matrix"))
10    
11    setAs("lsCMatrix", "lsTMatrix",
12          function(from) .Call("Csparse_to_Tsparse", from, PACKAGE = "Matrix"))
13    
14  setAs("lsCMatrix", "dsCMatrix",  setAs("lsCMatrix", "dsCMatrix",
15        function(from) new("dsCMatrix", i = from@i, p = from@p,        function(from) new("dsCMatrix", i = from@i, p = from@p,
16                           x = rep(1, length(from@i)), uplo = from@uplo,                           x = rep(1, length(from@i)), uplo = from@uplo,
17                           Dim = from@Dim, Dimnames = from@Dimnames))                           Dim = from@Dim, Dimnames = from@Dimnames))
18    
19    setAs("lsCMatrix", "dgTMatrix",
20          function(from) callGeneric(as(x, "dsCMatrix")))
21    
22    ## FIXME: should be superfluous now:
23  setMethod("image", "lsCMatrix",  setMethod("image", "lsCMatrix",
24            function(x, ...) {            function(x, ...) {
25                x <- as(as(x, "dsCMatrix"), "dgTMatrix")                x <- as(as(x, "dsCMatrix"), "dgTMatrix")

Legend:
Removed from v.729  
changed lines
  Added in v.946

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