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 677 - (view) (download)

1 : bates 677 #### Sparse Matrices in Compressed row-oriented format
2 :    
3 :     ### contains = "dMatrix"
4 :    
5 :     setAs("dgRMatrix", "dgTMatrix",
6 :     function(from) .Call("compressed_to_dgTMatrix", from, FALSE))
7 :    
8 :     ##setAs("dgRMatrix", "matrix",
9 :     ## function(from) .Call("csc_to_matrix", from))
10 :    
11 :     ##setAs("dgRMatrix", "dgeMatrix",
12 :     ## function(from) .Call("csc_to_dgeMatrix", from))
13 :    
14 :     ##setAs("matrix", "dgRMatrix",
15 :     ## function(from) {
16 :     ## storage.mode(from) <- "double"
17 :     ## .Call("matrix_to_csc", from)
18 :     ## })
19 :    
20 :     ##setMethod("diag", signature(x = "dgRMatrix"),
21 :     ## function(x = 1, nrow, ncol = n) .Call("csc_getDiag", x))
22 :    
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 :     ## function(x) .Call("csc_transpose", x),
29 :     ## 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