SCM

SCM Repository

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

View of /pkg/R/ltCMatrix.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1571 - (download) (annotate)
Sat Sep 16 21:03:12 2006 UTC (13 years, 2 months ago) by maechler
File size: 1004 byte(s)
several small fixes + more tests for "lMatrix" classes; "Compare"; "chol"
#### Logical Sparse Triangular Matrices in Compressed column-oriented format

setAs("ltCMatrix", "matrix",
      function(from) as(as(from, "lgCMatrix"), "matrix"))
setAs("matrix", "ltCMatrix",
      function(from) as(as(from, "dtCMatrix"), "ltCMatrix"))

setAs("ltCMatrix", "lgCMatrix",
      function(from) copyClass(from, "lgCMatrix"))

setAs("ltCMatrix", "dMatrix", # < instead of "dtCMatrix"
      function(from) new("dtCMatrix", i = from@i, p = from@p,
                         x = as.double(from@x), uplo = from@uplo,
                         diag = from@diag,
                         Dim = from@Dim, Dimnames = from@Dimnames))

## setAs("ltCMatrix", "generalMatrix",
##       function(from) ......)

setMethod("image", "ltCMatrix",
          function(x, ...) {
              x <- as(as(x, "dtCMatrix"), "dgTMatrix")
              callGeneric()
          })

## setMethod("t", signature(x = "ltCMatrix"),
##           function(x) .Call(ltCMatrix_trans, x),
##           valueClass = "ltCMatrix")

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