SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/inst/test-tools-1.R
ViewVC logotype

Diff of /pkg/Matrix/inst/test-tools-1.R

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

revision 2888, Wed Aug 7 13:56:43 2013 UTC revision 2889, Thu Aug 8 21:06:22 2013 UTC
# Line 211  Line 211 
211      m      m
212  }  }
213    
214  assert.EQ.mat <- function(M, m, tol = if(show) 0 else 1e-15, show=FALSE) {  assert.EQ.mat <- function(M, m, tol = if(show) 0 else 1e-15, show=FALSE, giveRE = FALSE, ...) {
215      ## Purpose: check equality of  'Matrix' M with  'matrix' m      ## Purpose: check equality of  'Matrix' M with  'matrix' m
216      ## ----------------------------------------------------------------------      ## ----------------------------------------------------------------------
217      ## Arguments: M: is(., "Matrix") typically {but just needs working as(., "matrix")}      ## Arguments: M: is(., "Matrix") typically {but just needs working as(., "matrix")}
# Line 222  Line 222 
222      if(is.logical(MM) && is.numeric(m))      if(is.logical(MM) && is.numeric(m))
223          storage.mode(MM) <- "integer"          storage.mode(MM) <- "integer"
224      attr(MM, "dimnames") <- attr(m, "dimnames") <- NULL      attr(MM, "dimnames") <- attr(m, "dimnames") <- NULL
225      assert.EQ(MM, m, tol=tol, show=show)      assert.EQ(MM, m, tol=tol, show=show, giveRE=giveRE)
226  }  }
227  ## a short cut  ## a short cut
228  assert.EQ.Mat <- function(M, M2, tol = if(show) 0 else 1e-15, show=FALSE)  assert.EQ.Mat <- function(M, M2, tol = if(show) 0 else 1e-15, show=FALSE, giveRE = FALSE, ...)
229      assert.EQ.mat(M, as.mat(M2), tol=tol, show=show)      assert.EQ.mat(M, as.mat(M2), tol=tol, show=show, giveRE=giveRE)
230    
231    
232  chk.matrix <- function(M) {  chk.matrix <- function(M) {

Legend:
Removed from v.2888  
changed lines
  Added in v.2889

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge