SCM

SCM Repository

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

Annotation of /pkg/R/dgRMatrix.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1037 - (view) (download)

1 : bates 677 #### Sparse Matrices in Compressed row-oriented format
2 :    
3 :     ### contains = "dMatrix"
4 :    
5 :     setAs("dgRMatrix", "dgTMatrix",
6 : bates 1037 function(from) .Call("compressed_to_dgTMatrix", from, FALSE, PACKAGE = "Matrix"))
7 : bates 677
8 :     ##setAs("dgRMatrix", "matrix",
9 : bates 1037 ## function(from) .Call("csc_to_matrix", from, PACKAGE = "Matrix"))
10 : bates 677
11 :     ##setAs("dgRMatrix", "dgeMatrix",
12 : bates 1037 ## function(from) .Call("csc_to_dgeMatrix", from, PACKAGE = "Matrix"))
13 : bates 677
14 :     ##setAs("matrix", "dgRMatrix",
15 :     ## function(from) {
16 :     ## storage.mode(from) <- "double"
17 : bates 1037 ## .Call("matrix_to_csc", from, PACKAGE = "Matrix")
18 : bates 677 ## })
19 :    
20 :     ##setMethod("diag", signature(x = "dgRMatrix"),
21 : bates 1037 ## function(x = 1, nrow, ncol = n) .Call("csc_getDiag", x, PACKAGE = "Matrix"))
22 : bates 677
23 :     ## try to define for "Matrix" -- once and for all -- but that fails -- why?
24 :     setMethod("dim", signature(x = "dgRMatrix"),
25 :     function(x) x@Dim, valueClass = "integer")
26 :    
27 :     ##setMethod("t", signature(x = "dgRMatrix"),
28 : bates 1037 ## function(x) .Call("csc_transpose", x, PACKAGE = "Matrix"),
29 : bates 677 ## valueClass = "dgRMatrix")
30 :    
31 :     setMethod("image", "dgRMatrix",
32 :     function(x, ...) {
33 :     x = as(x, "dgTMatrix")
34 :     callGeneric()
35 :     })

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