SCM

SCM Repository

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

Diff of /pkg/tests/indexing.R

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

revision 1673, Mon Nov 6 20:54:26 2006 UTC revision 1705, Sat Dec 16 12:37:25 2006 UTC
# Line 125  Line 125 
125            identical(as.mat(l3 ), m.x[1:3, ] != 0)            identical(as.mat(l3 ), m.x[1:3, ] != 0)
126            )            )
127    
128    ## used to fail
129    n <- 5 ## or much larger
130    sm <- new("dsTMatrix", i=as.integer(1),j=as.integer(1),
131              Dim=as.integer(c(n,n)), x = 1)
132    (cm <- as(sm, "CsparseMatrix"))
133    sm[2,]
134    stopifnot(sm[2,] == c(0:1, rep.int(0,ncol(sm)-2)),
135              sm[2,] == cm[2,],
136              sm[,3] == sm[3,],
137              all(sm[,-(1:3)] == t(sm[-(1:3),])), # all(<lge.>)
138              all(sm[,-(1:3)] == 0)
139              )
140    
141    
142  ## --- negative indices ----------  ## --- negative indices ----------
143  mc <- mC[1:5, 1:7]  mc <- mC[1:5, 1:7]

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

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