SCM

SCM Repository

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

Diff of /pkg/R/Rsparse.R

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

revision 1911, Tue Jun 19 16:16:58 2007 UTC revision 1945, Wed Jul 4 18:07:07 2007 UTC
# Line 32  Line 32 
32      if(is.na(icl)) stop("invalid class:", cl)      if(is.na(icl)) stop("invalid class:", cl)
33      Ccl <- sub("^(..)R","\\1C", cl)  # corresponding Csparse class name      Ccl <- sub("^(..)R","\\1C", cl)  # corresponding Csparse class name
34      r <- new(Ccl)      r <- new(Ccl)
35      r@Dim <- rev(from@Dim)      r@Dim <- from@Dim[2:1]
36      if(icl %/% 3 != 2) ## not "n..Matrix" --> has 'x' slot      if(icl %/% 3 != 2) ## not "n..Matrix" --> has 'x' slot
37          r@x <- from@x          r@x <- from@x
38      if(icl %% 3 != 0) {                 # symmetric or triangular      if(icl %% 3 != 0) {                 # symmetric or triangular
# Line 62  Line 62 
62      r@i <- from@j      r@i <- from@j
63      ##-         -      ##-         -
64      r@p <- from@p      r@p <- from@p
65      r@Dim      <- rev(from@Dim)      r@Dim      <- from@Dim[2:1]
66      r@Dimnames <- rev(from@Dimnames)      r@Dimnames <- from@Dimnames[2:1]
67    
68      if(icl %/% 3 != 2) ## not "n..Matrix" --> has 'x' slot      if(icl %/% 3 != 2) ## not "n..Matrix" --> has 'x' slot
69          r@x <- from@x          r@x <- from@x

Legend:
Removed from v.1911  
changed lines
  Added in v.1945

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