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 1201 - (download) (annotate)
Mon Jan 23 16:04:12 2006 UTC (13 years, 7 months ago) by maechler
File size: 974 byte(s)
Class cleanup; particularly ldense* ones
#### Logical Sparse Triangular Matrices in Triplet format

### contains = "lsparseMatrix"

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

setAs("ltTMatrix", "lgTMatrix",
      function(from) new("lgTMatrix", i = from@i, j = from@j, x = from@x,
                         Dim = from@Dim, Dimnames = from@Dimnames))

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