SCM

SCM Repository

[matrix] Diff of /pkg/tests/simple.R
ViewVC logotype

Diff of /pkg/tests/simple.R

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

revision 1318, Mon Jul 17 13:06:55 2006 UTC revision 1319, Mon Jul 17 13:08:04 2006 UTC
# Line 111  Line 111 
111  (tM <- Matrix(tm))                ## dtC  (tM <- Matrix(tm))                ## dtC
112  (mM <- Matrix(m <- (tm + t(tm)))) ## dsC  (mM <- Matrix(m <- (tm + t(tm)))) ## dsC
113  mT <- as(mM, "dsTMatrix")  mT <- as(mM, "dsTMatrix")
114    gC <- as(as(mT, "dgTMatrix"), "dgCMatrix")
115    ## Check that 'mT' and gC print properly :
116    pr.mT <- capture.output(mT)
117    nn <- unlist(strsplit(gsub(" +\\.", "", sub("^....", "", pr.mT[-(1:2)])), " "))
118    stopifnot(as.numeric(nn[nn != ""]) == m[m != 0],
119              capture.output(gC)[-1] == pr.mT[-1])
120  assert.EQ.mat(tM, tm, tol=0)  assert.EQ.mat(tM, tm, tol=0)
121    assert.EQ.mat(gC, m,  tol=0)
122  assert.EQ.mat(mT, m,  tol=0)  assert.EQ.mat(mT, m,  tol=0)
123  stopifnot(is(mM, "dsCMatrix"), is(tM, "dtCMatrix"),  stopifnot(is(mM, "dsCMatrix"), is(tM, "dtCMatrix"),
124            ## coercions  general <-> symmetric            ## coercions  general <-> symmetric

Legend:
Removed from v.1318  
changed lines
  Added in v.1319

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