SCM

SCM Repository

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

Diff of /pkg/R/Rsparse.R

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

revision 1654, Fri Oct 27 16:58:15 2006 UTC revision 1655, Mon Oct 30 17:16:27 2006 UTC
# Line 30  Line 30 
30    
31  setAs("dgRMatrix", "dgCMatrix",  setAs("dgRMatrix", "dgCMatrix",
32        function(from) as(as(from, "dgTMatrix"), "dgCMatrix"))        function(from) as(as(from, "dgTMatrix"), "dgCMatrix"))
33    setAs("dgRMatrix", "CsparseMatrix", function(from) as(from, "dgCMatrix"))
34    
35  ## **VERY** cheap substitutes:  work via dgC and t(.)  ## **VERY** cheap substitutes:  work via dgC and t(.)
36  .to.dgR <- function(from) {  .to.dgR <- function(from) {
# Line 39  Line 40 
40  }  }
41    
42  setAs("matrix",    "dgRMatrix", .to.dgR)  setAs("matrix",    "dgRMatrix", .to.dgR)
43    setAs("dgeMatrix", "dgRMatrix", .to.dgR)
44  setAs("dgCMatrix", "dgRMatrix", .to.dgR)  setAs("dgCMatrix", "dgRMatrix", .to.dgR)
45  setAs("dgTMatrix", "dgRMatrix", .to.dgR)  setAs("dgTMatrix", "dgRMatrix", .to.dgR)
46    
# Line 68  Line 70 
70                callGeneric()                callGeneric()
71            })            })
72    
73    setMethod("t", "RsparseMatrix",
74              function(x) as_Rsparse(t(as_Tsparse(x))))
75    
76    
77  ## Want tril(), triu(), band() --- just as "indexing" ---  ## Want tril(), triu(), band() --- just as "indexing" ---
78  ## return a "close" class:  ## return a "close" class:

Legend:
Removed from v.1654  
changed lines
  Added in v.1655

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