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 2198, Mon Jun 2 16:07:31 2008 UTC revision 2203, Sat Jun 14 20:09:17 2008 UTC
# Line 528  Line 528 
528            identical(R [2:3,TRUE], R [2:3,]),            identical(R [2:3,TRUE], R [2:3,]),
529            dim(R[FALSE, FALSE]) == c(0,0))            dim(R[FALSE, FALSE]) == c(0,0))
530    
531    n <- 50000L
532    Lrg <- new("dgTMatrix", Dim = c(n,n))
533    diag(Lrg) <- 1:n
534    dLrg <- as(Lrg, "diagonalMatrix")
535    stopifnot(identical(Diagonal(x = 1:n), dLrg))
536    diag(dLrg) <- 1 + diag(dLrg)
537    Clrg <- as(Lrg,"CsparseMatrix")
538    Ctrg <- as(Clrg, "triangularMatrix")
539    diag(Ctrg) <- 1 + diag(Ctrg)
540    stopifnot(identical(Diagonal(x = 1+ 1:n), dLrg),
541              identical(Ctrg, as(dLrg,"CsparseMatrix")))
542    
543    cc <- capture.output(show(dLrg))# show(<diag>) used to error for large n
544    
545  cat('Time elapsed: ', (.pt <- proc.time()),'\n') # "stats"  cat('Time elapsed: ', (.pt <- proc.time()),'\n') # "stats"
546  ##  ##
547  cat("checkMatrix() of all: \n---------\n")  cat("checkMatrix() of all: \n---------\n")

Legend:
Removed from v.2198  
changed lines
  Added in v.2203

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