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 1798, Sat Mar 24 14:52:47 2007 UTC revision 1799, Sat Mar 24 14:54:00 2007 UTC
# Line 7  Line 7 
7    
8  setAs("ANY", "sparseMatrix", function(from) as(from, "CsparseMatrix"))  setAs("ANY", "sparseMatrix", function(from) as(from, "CsparseMatrix"))
9    
10  setAs(from = "sparseMatrix", to = "generalMatrix", as_gCsimpl)  setAs(from = "sparseMatrix", to = "generalMatrix",
11          function(from) as_gSparse(from))
12    
13  ## "graph" coercions -- this needs the graph package which is currently  ## "graph" coercions -- this needs the graph package which is currently
14  ##  -----               *not* required on purpose  ##  -----               *not* required on purpose
# Line 354  Line 355 
355    
356  setMethod("isDiagonal", signature(object = "sparseMatrix"),  setMethod("isDiagonal", signature(object = "sparseMatrix"),
357            function(object) {            function(object) {
358                  d <- dim(object)
359                  if(d[1] != d[2]) return(FALSE)
360                  ## else
361                gT <- as(object, "TsparseMatrix")                gT <- as(object, "TsparseMatrix")
362                all(gT@i == gT@j)                all(gT@i == gT@j)
363            })            })

Legend:
Removed from v.1798  
changed lines
  Added in v.1799

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