SCM

SCM Repository

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

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

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

revision 1672, Mon Nov 6 20:25:10 2006 UTC revision 1673, Mon Nov 6 20:54:26 2006 UTC
# Line 13  Line 13 
13      m      m
14  }  }
15    
16    asD <- function(m) { ## as "Dense"
17        if(canCoerce(m, "denseMatrix")) as(m, "denseMatrix")
18        else if(canCoerce(m, (cl <- paste(.M.kind(m), "denseMatrix", sep=''))))
19            as(m, cl)
20        else if(canCoerce(m, "dgeMatrix")) as(m, "dgeMatrix")
21        else stop("cannot coerce to a typical dense Matrix")
22    }
23    
24  ## checking;  'show' is for convenience of the developer  ## checking;  'show' is for convenience of the developer
25  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) {
26      MM <- as.mat(M) # as(M, "matrix")      MM <- as.mat(M) # as(M, "matrix")

Legend:
Removed from v.1672  
changed lines
  Added in v.1673

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