SCM

SCM Repository

[matrix] View of /pkg/R/ltTMatrix.R
ViewVC logotype

View of /pkg/R/ltTMatrix.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1109 - (download) (annotate)
Tue Jan 3 16:42:31 2006 UTC (13 years, 9 months ago) by maechler
File size: 799 byte(s)
"diagonalMatrix" class and subclasses with a few methods; very basic "ltTMatrix" methods
#### Logical Sparse Triangular Matrices in Triplet format

### contains = "lsparseMatrix"

setAs("ltTMatrix", "matrix",
      function(from) as(as(from, "dtTMatrix"), "matrix"))

setAs("ltTMatrix", "dtTMatrix",
      function(from) new("dtTMatrix", i = from@i, j = from@j,
                         x = rep.int(1, length(from@i)), uplo = from@uplo,
                         diag = from@diag,
                         Dim = from@Dim, Dimnames = from@Dimnames))

## untested:
setMethod("image", "ltTMatrix",
          function(x, ...) {
              x <- as(as(x, "dtTMatrix"), "dgTMatrix")
              callGeneric()
          })

## FIXME
## setMethod("t", signature(x = "ltTMatrix"),
##           function(x) .Call("ltTMatrix_trans", x, PACKAGE = "Matrix"),
##           valueClass = "ltTMatrix")

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