SCM

SCM Repository

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

Diff of /pkg/tests/dtpMatrix.R

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

revision 656, Wed Mar 16 16:55:32 2005 UTC revision 657, Wed Mar 16 16:57:52 2005 UTC
# Line 7  Line 7 
7  1/tp6        ## "Arith" group : gives 'dgeMatrix'  1/tp6        ## "Arith" group : gives 'dgeMatrix'
8  str(tp6)  str(tp6)
9  stopifnot(validObject(tp6),  stopifnot(validObject(tp6),
10            all.equal(tp6 %*% diag(6), as(tp6, "matrix")),            all.equal(tp6 %*% diag(6), as(tp6, "dgeMatrix")),
11            validObject(tp6. <- diag(6) %*% tp6),            validObject(tp6. <- diag(6) %*% tp6),
12            class((tt6 <- t(tp6))) == "dtpMatrix",            class((tt6 <- t(tp6))) == "dtpMatrix",
13            identical(t(tt6), tp6),            identical(t(tt6), tp6),
# Line 42  Line 42 
42            x = rnorm(500*1001))            x = rnorm(500*1001))
43  validObject(rl)  validObject(rl)
44  str(rl)  str(rl)
45  norm(rl, "I")  sapply(c("I", "1", "F"), function(type) norm(rl, type=type))
 norm(rl, "1")  
 norm(rl, "F")  
46  rcond(rl)# 0 !  rcond(rl)# 0 !
47  stopifnot(all.equal(rl %*% diag(1000),  stopifnot(all.equal(as(rl %*% diag(1000),"matrix"),
48                      as(rl, "matrix")))                      as(rl, "matrix")))
49  object.size(rl)  object.size(rl) ## 4 mio
50  object.size(as(rl, "dtrMatrix"))  object.size(as(rl, "dtrMatrix"))# 8 mio
51  object.size(as(rl, "matrix"))  object.size(as(rl, "matrix"))# dito
52  determinant(rl)  determinant(rl)
53    
54    

Legend:
Removed from v.656  
changed lines
  Added in v.657

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