SCM

SCM Repository

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

Diff of /pkg/R/sparseMatrix.R

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

revision 2055, Thu Aug 16 15:48:27 2007 UTC revision 2056, Thu Aug 16 16:42:10 2007 UTC
# Line 165  Line 165 
165    
166  setMethod("[", signature(x = "sparseMatrix", i = "index", j = "missing",  setMethod("[", signature(x = "sparseMatrix", i = "index", j = "missing",
167                           drop = "logical"),                           drop = "logical"),
168            function (x, i, j, drop) {            function (x, i, drop) {
169                cld <- getClassDef(class(x))                cld <- getClassDef(class(x))
170                if(!extends(cld, "generalMatrix")) x <- as(x, "generalMatrix")                if(!extends(cld, "generalMatrix")) x <- as(x, "generalMatrix")
171                viaCl <- paste(.M.kind(x, cld), "gTMatrix", sep='')                viaCl <- paste(.M.kind(x, cld), "gTMatrix", sep='')
# Line 177  Line 177 
177    
178  setMethod("[", signature(x = "sparseMatrix", i = "missing", j = "index",  setMethod("[", signature(x = "sparseMatrix", i = "missing", j = "index",
179                           drop = "logical"),                           drop = "logical"),
180            function (x, i, j, drop) {            function (x, j, drop) {
181                cld <- getClassDef(class(x))                cld <- getClassDef(class(x))
182                if(!extends(cld, "generalMatrix")) x <- as(x, "generalMatrix")                if(!extends(cld, "generalMatrix")) x <- as(x, "generalMatrix")
183                viaCl <- paste(.M.kind(x, cld), "gTMatrix", sep='')                viaCl <- paste(.M.kind(x, cld), "gTMatrix", sep='')
# Line 188  Line 188 
188    
189  setMethod("[", signature(x = "sparseMatrix",  setMethod("[", signature(x = "sparseMatrix",
190                           i = "index", j = "index", drop = "logical"),                           i = "index", j = "index", drop = "logical"),
191            function (x, i, j, drop) {            function (x, i, j, ..., drop) {
192                cld <- getClassDef(class(x))                cld <- getClassDef(class(x))
193                ## be smart to keep symmetric indexing of <symm.Mat.> symmetric:                ## be smart to keep symmetric indexing of <symm.Mat.> symmetric:
194                doSym <- (extends(cld, "symmetricMatrix") &&                doSym <- (extends(cld, "symmetricMatrix") &&

Legend:
Removed from v.2055  
changed lines
  Added in v.2056

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