SCM

SCM Repository

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

Annotation of /pkg/R/lgCMatrix.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 868 - (view) (download)

1 : bates 720 #### Logical Sparse Matrices in Compressed column-oriented format
2 :    
3 :     ### contains = "lsparseMatrix"
4 :    
5 :     setMethod("%*%", signature(x = "lgCMatrix", y = "lgCMatrix"),
6 :     function(x, y) .Call("lgCMatrix_lgCMatrix_mm", x, y),
7 :     valueClass = "lgCMatrix")
8 :    
9 :     setMethod("t", signature(x = "lgCMatrix"),
10 :     function(x) .Call("lgCMatrix_trans", x),
11 :     valueClass = "lgCMatrix")
12 :    
13 : bates 723 setMethod("crossprod", signature(x = "lgCMatrix", y = "missing"),
14 : bates 729 function(x, y = NULL) .Call("lgCMatrix_crossprod", x, TRUE, NULL),
15 : bates 723 valueClass = "lsCMatrix")
16 :    
17 :     setMethod("tcrossprod", signature(x = "lgCMatrix"),
18 : bates 729 function(x) .Call("lgCMatrix_crossprod", x, FALSE, NULL),
19 : bates 723 valueClass = "lsCMatrix")
20 :    
21 :     setAs("lgCMatrix", "dgCMatrix",
22 :     function(from) new("dgCMatrix", i = from@i, p = from@p,
23 :     x = rep(1, length(from@i)),
24 :     Dim = from@Dim, Dimnames = from@Dimnames))
25 :    
26 : bates 729 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 : maechler 868 setAs("lgCMatrix", "matrix",
32 :     function(from) .Call("lcsc_to_matrix", from))
33 :    
34 :    
35 : bates 729 setMethod("image", "lgCMatrix",
36 :     function(x, ...) {
37 :     x <- as(as(x, "dgCMatrix"), "dgTMatrix")
38 :     callGeneric()
39 :     })
40 :    

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