SCM

SCM Repository

[matrix] Diff of /pkg/R/dtCMatrix.R
ViewVC logotype

Diff of /pkg/R/dtCMatrix.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1208, Wed Jan 25 15:19:29 2006 UTC revision 1209, Wed Jan 25 23:42:57 2006 UTC
# Line 1  Line 1 
1  setMethod("t", signature(x = "dtCMatrix"),  setMethod("t", signature(x = "dtCMatrix"),
2            function(x) .Call("tsc_transpose", x, PACKAGE = "Matrix"),            function(x) {
3            valueClass = "dtCMatrix")                tg <- t(as(x, "dgCMatrix"))
4                  new("dtCMatrix", Dim = tg@Dim, Dimnames = tg@Dimnames,
5                      p = tg@p, i = tg@i, x = tg@x, diag = x@diag,
6                      uplo = ifelse(x@uplo == "U", "L", "U"))
7              }, valueClass = "dtCMatrix")
8    
9  setAs("dtCMatrix", "ltCMatrix", # just drop 'x' slot:  setAs("dtCMatrix", "ltCMatrix", # just drop 'x' slot:
10        function(from) new("ltCMatrix", i = from@i, p = from@p,        function(from) new("ltCMatrix", i = from@i, p = from@p,

Legend:
Removed from v.1208  
changed lines
  Added in v.1209

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