SCM

SCM Repository

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

View of /pkg/R/dsTMatrix.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 589 - (download) (annotate)
Wed Mar 2 19:53:53 2005 UTC (14 years, 3 months ago) by bates
File size: 725 byte(s)
more coercions
  ### Coercion and Methods for Symmetric Triplet Matrices

setAs("dsTMatrix", "dsCMatrix",
      function(from) .Call("dsTMatrix_as_dsCMatrix", from))

## Conversion to dense storage is first to a dsyMatrix
setAs("dsTMatrix", "dsyMatrix",
      function(from) .Call("dsTMatrix_as_dsyMatrix", from))

setAs("dsTMatrix", "dgeMatrix",
      function(from) as(as(from, "dsyMatrix"), "dgeMatrix"))

setAs("dsTMatrix", "matrix",
      function(from) as(as(from, "dsyMatrix"), "matrix"))
      
setMethod("t", signature(x = "dsTMatrix"),
          function(x)
          new("dsTMatrix", Dim = x@Dim,
              i = x@j, j = x@i, x = x@x,
              uplo = if (x@uplo == "U") "L" else "U"),
          valueClass = "dsTMatrix")

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