Revision 064f27d90fcbda7122d5b74508651e2917cc3feb authored by Doug and Martin on 17 October 2011, 00:00:00 UTC, committed by Gabor Csardi on 17 October 2011, 00:00:00 UTC
1 parent a707be9
nsTMatrix.R
#### Sparse Symmetric non-zero pattern Matrices in Triplet format
### contains = "nsparseMatrix"
setAs("nsTMatrix", "matrix",
function(from) as(as(from, "ngTMatrix"), "matrix"))
setAs("nsTMatrix", "ngCMatrix", # for diag
function(from) as(as(from, "nsCMatrix"), "ngCMatrix"))
setAs("nsTMatrix", "ngTMatrix",
function(from) .Call(nsTMatrix_as_ngTMatrix, from))
setAs("nsTMatrix", "dsTMatrix",
function(from)
new("dsTMatrix", i = from@i, j = from@j, uplo = from@uplo,
x = rep.int(1., length(from@i)),
Dim = from@Dim, Dimnames = from@Dimnames))
setAs("nsTMatrix", "nsyMatrix",
function(from) .Call(nsTMatrix_as_nsyMatrix, from))
setMethod("t", "nsTMatrix",
function(x)
new("nsTMatrix", Dim = x@Dim, Dimnames = x@Dimnames,
i = x@j, j = x@i, uplo = if (x@uplo == "U") "L" else "U"))
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...