SCM

SCM Repository

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

Diff of /pkg/R/dgCMatrix.R

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

revision 682, Thu Mar 31 08:07:02 2005 UTC revision 683, Thu Mar 31 17:10:16 2005 UTC
# Line 1  Line 1 
1  #### Sparse Matrices in Compressed column-oriented format  #### Sparse Matrices in Compressed column-oriented format
2    
3  ### contains = "dMatrix"  ### contains = "dsparseMatrix"
4    
5  setAs("dgCMatrix", "dgTMatrix",  setAs("dgCMatrix", "dgTMatrix",
6        function(from) .Call("compressed_to_dgTMatrix", from, TRUE))        function(from) .Call("compressed_to_dgTMatrix", from, TRUE))
# Line 22  Line 22 
22        })        })
23    
24  setMethod("crossprod", signature(x = "dgCMatrix", y = "missing"),  setMethod("crossprod", signature(x = "dgCMatrix", y = "missing"),
25            function(x, y = NULL) .Call("csc_crossprod", x))            function(x, y = NULL) .Call("csc_crossprod", x),
26              valueClass = "dsCMatrix")
27    
28    setMethod("crossprod", signature(x = "dgCMatrix", y = "dgeMatrix"),
29              function(x, y = NULL) .Call("csc_matrix_crossprod", x, y, TRUE),
30              valueClass = "dgeMatrix")
31    
32  setMethod("crossprod", signature(x = "dgCMatrix", y = "matrix"),  setMethod("crossprod", signature(x = "dgCMatrix", y = "matrix"),
33            function(x, y = NULL) .Call("csc_matrix_crossprod", x, y))            function(x, y = NULL) .Call("csc_matrix_crossprod", x, y, FALSE),
34              valueClass = "dgeMatrix")
35    
36  setMethod("crossprod", signature(x = "dgCMatrix", y = "numeric"),  ##setMethod("crossprod", signature(x = "dgCMatrix", y = "numeric"),
37            function(x, y = NULL) .Call("csc_matrix_crossprod", x, as.matrix(y)))  ##          function(x, y = NULL) callGeneric(x, as.matrix(y)),
38    ##          valueClass = "dgeMatrix")
39    
40  setMethod("tcrossprod", signature(x = "dgCMatrix"),  setMethod("tcrossprod", signature(x = "dgCMatrix"),
41            function(x) .Call("csc_tcrossprod", x))            function(x) .Call("csc_tcrossprod", x))
# Line 49  Line 56 
56                x = as(x, "dgTMatrix")                x = as(x, "dgTMatrix")
57                callGeneric()                callGeneric()
58            })            })
59    
60    setMethod("%*%", signature(x = "dgCMatrix", y = "dgeMatrix"),
61              function(x, y) .Call("dgCMatrix_matrix_mm", x, y, TRUE, FALSE),
62              valueClass = "dgeMatrix")
63    

Legend:
Removed from v.682  
changed lines
  Added in v.683

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge