SCM

SCM Repository

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

Diff of /pkg/R/lgCMatrix.R

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

revision 728, Sat May 14 00:21:17 2005 UTC revision 729, Tue May 17 17:16:39 2005 UTC
# Line 11  Line 11 
11            valueClass = "lgCMatrix")            valueClass = "lgCMatrix")
12    
13  setMethod("crossprod", signature(x = "lgCMatrix", y = "missing"),  setMethod("crossprod", signature(x = "lgCMatrix", y = "missing"),
14            function(x, y = NULL) .Call("lgCMatrix_crossprod", x, TRUE),            function(x, y = NULL) .Call("lgCMatrix_crossprod", x, TRUE, NULL),
15            valueClass = "lsCMatrix")            valueClass = "lsCMatrix")
16    
17  setMethod("tcrossprod", signature(x = "lgCMatrix"),  setMethod("tcrossprod", signature(x = "lgCMatrix"),
18            function(x) .Call("lgCMatrix_crossprod", x, FALSE),            function(x) .Call("lgCMatrix_crossprod", x, FALSE, NULL),
19            valueClass = "lsCMatrix")            valueClass = "lsCMatrix")
20    
21  setAs("lgCMatrix", "dgCMatrix",  setAs("lgCMatrix", "dgCMatrix",
# Line 23  Line 23 
23                           x = rep(1, length(from@i)),                           x = rep(1, length(from@i)),
24                           Dim = from@Dim, Dimnames = from@Dimnames))                           Dim = from@Dim, Dimnames = from@Dimnames))
25    
26    setAs("lgCMatrix", "lgTMatrix",
27          function(from) new("lgTMatrix", i = from@i,
28                             j = .Call("Matrix_expand_pointers", from@p),
29                             Dim = from@Dim, Dimnames = from@Dimnames))
30    
31    setMethod("image", "lgCMatrix",
32              function(x, ...) {
33                  x <- as(as(x, "dgCMatrix"), "dgTMatrix")
34                  callGeneric()
35              })
36    

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

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