SCM

SCM Repository

[matrix] Diff of /pkg/tests/Class+Meth.R
ViewVC logotype

Diff of /pkg/tests/Class+Meth.R

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

revision 867, Fri Aug 19 16:59:46 2005 UTC revision 868, Fri Aug 19 17:01:11 2005 UTC
# Line 26  Line 26 
26  showMethods(where="package:Matrix")  showMethods(where="package:Matrix")
27    
28    
29  ### Show sparse logical matrices:  ### Sparse Logical:
30    m <- Matrix(c(0,0,2:0), 3,5)
31    mT <- as(mC <- as(m, "dgCMatrix"), "dgTMatrix")
32    stopifnot(identical(as(mT,"dgCMatrix"), mC))
33    as(as(as(mT[1:2, 2:3], "dgCMatrix"), "lgCMatrix"),"ltCMatrix")
34    
35    ### Test all classes:
36    
37  mM <- Matrix(1:4 >= 4, 2,2)  mM <- Matrix(1:4 >= 4, 2,2)
38  for(cl in getClass("lsparseMatrix")@subclasses) {  for(cl in getClass("lsparseMatrix")@subclasses) {
39      clNam <- cl@subClass      clNam <- cl@subClass

Legend:
Removed from v.867  
changed lines
  Added in v.868

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