SCM

SCM Repository

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

Diff of /pkg/R/Tsparse.R

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

revision 1279, Tue May 23 08:01:11 2006 UTC revision 1280, Tue May 23 08:01:44 2006 UTC
# Line 1  Line 1 
1  #### "TsparseMatrix" : Virtual class of sparse matrices in triplet-format  #### "TsparseMatrix" : Virtual class of sparse matrices in triplet-format
2    
3  setAs("TsparseMatrix", "CsparseMatrix",  setAs("TsparseMatrix", "CsparseMatrix",
4        function(from) .Call("Tsparse_to_Csparse", from, PACKAGE = "Matrix"))        function(from) .Call(Tsparse_to_Csparse, from))
5    
6  ### "[" :  ### "[" :
7  ### -----  ### -----
# Line 148  Line 148 
148    
149  setMethod("crossprod", signature(x = "TsparseMatrix", y = "missing"),  setMethod("crossprod", signature(x = "TsparseMatrix", y = "missing"),
150            function(x, y = NULL) {            function(x, y = NULL) {
151                a <- .Call("Csparse_crossprod", x, trans = FALSE, triplet = TRUE,                a <- .Call(Csparse_crossprod, x, trans = FALSE, triplet = TRUE,
152                           PACKAGE = "Matrix")                           PACKAGE = "Matrix")
153                switch(substr(class(a)[1], 1, 1),                switch(substr(class(a)[1], 1, 1),
154                       "d" ={ new("dsCMatrix", i = a@i, p = a@p, x = a@x,                       "d" ={ new("dsCMatrix", i = a@i, p = a@p, x = a@x,
# Line 161  Line 161 
161    
162  setMethod("tcrossprod", signature(x = "TsparseMatrix", y = "missing"),  setMethod("tcrossprod", signature(x = "TsparseMatrix", y = "missing"),
163            function(x, y = NULL) {            function(x, y = NULL) {
164                a <- .Call("Csparse_crossprod", x, trans = TRUE, triplet = TRUE,                a <- .Call(Csparse_crossprod, x, trans = TRUE, triplet = TRUE,
165                           PACKAGE = "Matrix")                           PACKAGE = "Matrix")
166                switch(substr(class(a)[1], 1, 1),                switch(substr(class(a)[1], 1, 1),
167                       "d" ={ new("dsCMatrix", i = a@i, p = a@p, x = a@x,                       "d" ={ new("dsCMatrix", i = a@i, p = a@p, x = a@x,

Legend:
Removed from v.1279  
changed lines
  Added in v.1280

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