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 953, Wed Sep 28 19:31:36 2005 UTC revision 954, Wed Sep 28 19:34:31 2005 UTC
# Line 33  Line 33 
33  stopifnot(identical(as(mT,"dgCMatrix"), mC))  stopifnot(identical(as(mT,"dgCMatrix"), mC))
34  (mlC <- as(as(mT[1:2, 2:3], "dgCMatrix"), "lgCMatrix"))  (mlC <- as(as(mT[1:2, 2:3], "dgCMatrix"), "lgCMatrix"))
35    
36  if(FALSE) ## ltC no longer extends lgC -- but need coercion possibility FIXME  if(FALSE) ## ltC no longer extends lgC -- want coercion possibility FIXME
37  as(mlC,"ltCMatrix")  as(mlC,"ltCMatrix")
38    
39    
# Line 52  Line 52 
52  no.show.classes <- paste(c("dgR", # only stub implementation  no.show.classes <- paste(c("dgR", # only stub implementation
53                             "dsR", # dito                             "dsR", # dito
54                             "dtR", #  "                             "dtR", #  "
                            ## if(!is.R22) # format(<0-length-matrix>) bug  
                            ## c("dtr", "dtp"),  
                            "lsp",  
                            ), "Matrix", sep='')  
   
 no.t.classes <- paste(c("dgR", # only stub implementation  
                         "dsR", # dito  
                         "dtR", #  "  
55                          ), "Matrix", sep='')                          ), "Matrix", sep='')
56    
57    no.t.classes <- no.show.classes # for the moment
58    
59  mM <- Matrix(1:4 >= 4, 2,2)  mM <- Matrix(1:4 >= 4, 2,2)
60  mm <- as(mM, "matrix")  mm <- as(mM, "matrix")
# Line 87  Line 80 
80                  cat(" ok\n")                  cat(" ok\n")
81              }              }
82    
83              ## The show() method implicitly tests              ## The show() method implicitly tests as( <obj> , "matrix"):
             ##  as( <obj> , "matrix")  
84              if(all(clNam != no.show.classes))              if(all(clNam != no.show.classes))
85                  show(m)                  show(m)
86              else cat("  -- no show() yet \n")              else cat("  -- no show() yet \n")
# Line 106  Line 98 
98                  }                  }
99              }              }
100    
101    ##             if(is(m, "denseMatrix")) {
102    ##                 ## .........
103    ##                 cat("as dsparse* ")
104    ##                 msp <- as(m, "dsparseMatrix")
105    ##                 cat("; valid coercion: ", validObject(msp), "\n")
106    ##             } else if(is(m, "sparseMatrix")) {
107    
108    ##             } else cat("-- not dense nor sparse -- should not happen(!?)\n")
109    
110              if(is(m, "dsparseMatrix")) {              if(is(m, "dsparseMatrix")) {
111                  ## make sure that we can coerce to  dgT* -- is needed, e.g. for "image"                  ## make sure that we can coerce to  dgT* -- is needed, e.g. for "image"
112                  cat("as dgT* ")                  cat("as dgT* ")

Legend:
Removed from v.953  
changed lines
  Added in v.954

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