SCM

SCM Repository

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

Annotation of /pkg/R/ntCMatrix.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1548 - (view) (download)

1 : maechler 1548 #### Logical Sparse Triangular Matrices in Compressed column-oriented format
2 :    
3 :     setAs("ntCMatrix", "matrix",
4 :     function(from) as(as(from, "ngCMatrix"), "matrix"))
5 :     setAs("matrix", "ntCMatrix",
6 :     function(from) as(as(from, "dtCMatrix"), "ntCMatrix"))
7 :    
8 :     setAs("ntCMatrix", "ngCMatrix",
9 :     function(from) new("ngCMatrix", i = from@i, p = from@p,
10 :     Dim = from@Dim, Dimnames = from@Dimnames))
11 :    
12 :     setAs("ntCMatrix", "dMatrix", # < instead of "dtCMatrix"
13 :     function(from) new("dtCMatrix", i = from@i, p = from@p,
14 :     x = rep.int(1, length(from@i)), uplo = from@uplo,
15 :     diag = from@diag,
16 :     Dim = from@Dim, Dimnames = from@Dimnames))
17 :    
18 :     ## setAs("ntCMatrix", "generalMatrix",
19 :     ## function(from) ......)
20 :    
21 :     setMethod("image", "ntCMatrix",
22 :     function(x, ...) {
23 :     x <- as(as(x, "dtCMatrix"), "dgTMatrix")
24 :     callGeneric()
25 :     })
26 :    
27 :     ## setMethod("t", signature(x = "ntCMatrix"),
28 :     ## function(x) .Call(ntCMatrix_trans, x),
29 :     ## valueClass = "ntCMatrix")

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