SCM

SCM Repository

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

Annotation of /pkg/R/nsTMatrix.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2185 - (view) (download)

1 : maechler 1599 #### Sparse Symmetric non-zero pattern Matrices in Triplet format
2 :    
3 :     ### contains = "nsparseMatrix"
4 :    
5 :     setAs("nsTMatrix", "matrix",
6 :     function(from) as(as(from, "ngTMatrix"), "matrix"))
7 :    
8 : maechler 1747 setAs("nsTMatrix", "ngCMatrix", # for diag
9 :     function(from) as(as(from, "nsCMatrix"), "ngCMatrix"))
10 :    
11 : maechler 1599 setAs("nsTMatrix", "ngTMatrix",
12 : maechler 1747 function(from) .Call(nsTMatrix_as_ngTMatrix, from))
13 : maechler 1599
14 :     setAs("nsTMatrix", "dsTMatrix",
15 : mmaechler 2175 function(from)
16 :     new("dsTMatrix", i = from@i, j = from@j, uplo = from@uplo,
17 :     x = rep.int(1., length(from@i)),
18 :     Dim = from@Dim, Dimnames = from@Dimnames))
19 : maechler 1599
20 : maechler 1747 setAs("nsTMatrix", "nsyMatrix",
21 :     function(from) .Call(nsTMatrix_as_nsyMatrix, from))
22 :    
23 :    
24 : mmaechler 2175 setMethod("t", "nsTMatrix",
25 :     function(x)
26 :     new("nsTMatrix", Dim = x@Dim, Dimnames = x@Dimnames,
27 :     i = x@j, j = x@i, uplo = if (x@uplo == "U") "L" else "U"))

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