SCM

SCM Repository

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

Diff of /pkg/R/Matrix.R

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

revision 2236, Wed Jul 23 16:48:14 2008 UTC revision 2245, Mon Aug 25 15:06:12 2008 UTC
# Line 361  Line 361 
361    
362    
363    
364    ## We want to use all.equal.numeric() *and* make sure that uses
365    ## not just base::as.vector but the generic with our methods:
366    all.equal_num <- base::all.equal.numeric ## from <R>/src/library/base/R/all.equal.R
367    environment(all.equal_num) <- environment()## == as.environment("Matrix")
368    all.equal_num_2 <- function(target,current, ...)
369        all.equal_num(as.vector(target), as.vector(current), ...)
370    ## The all.equal() methods for dense matrices (and fallback):
371    setMethod("all.equal", c(target = "Matrix", current = "Matrix"),
372              all.equal_num_2)
373    setMethod("all.equal", c(target = "Matrix", current = "ANY"),
374              all.equal_num_2)
375    setMethod("all.equal", c(target = "ANY", current = "Matrix"),
376              all.equal_num_2)
377    ## -> ./sparseMatrix.R, ./sparseVector.R  have specific methods
378    
379    
380    
381  ## MM: More or less "Cut & paste" from  ## MM: More or less "Cut & paste" from
382  ## --- diff.default() from  R/src/library/base/R/diff.R :  ## --- diff.default() from  R/src/library/base/R/diff.R :

Legend:
Removed from v.2236  
changed lines
  Added in v.2245

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