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 1547, Mon Sep 11 14:49:39 2006 UTC revision 1548, Mon Sep 11 22:13:07 2006 UTC
# Line 39  Line 39 
39  m <- Matrix(c(0,0,2:0), 3,5)  m <- Matrix(c(0,0,2:0), 3,5)
40  mT <- as(mC <- as(m, "dgCMatrix"), "dgTMatrix")  mT <- as(mC <- as(m, "dgCMatrix"), "dgTMatrix")
41  stopifnot(identical(as(mT,"dgCMatrix"), mC))  stopifnot(identical(as(mT,"dgCMatrix"), mC))
42  (mlC <- as(as(mT[1:2, 2:3], "dgCMatrix"), "lgCMatrix"))  (mC. <- as(mT[1:2, 2:3], "dgCMatrix"))
43    (mlC <- as(mC. , "lgCMatrix"))
44    
45  if(FALSE) ## ltC no longer extends lgC -- want coercion possibility FIXME  if(FALSE) ## ltC no longer extends lgC -- want coercion possibility FIXME
46  as(mlC,"ltCMatrix")  as(mlC,"ltCMatrix")
# Line 48  Line 49 
49  ### Test all classes:  validObject(new( * )) should be fulfilled -----------  ### Test all classes:  validObject(new( * )) should be fulfilled -----------
50    
51  ## need stoplist for now:  ## need stoplist for now:
52  not.ok.classes <- paste(c("lgR", # only stub implementation  Rcl.struc <- c("gR", "sR", "tR")
53                            "lsR", # dito  not.ok.classes <- paste(c(sort(outer(c("l", "n"), Rcl.struc, paste0)),
54                            "ltR", # dito                                          # only stub implementation
55                              ## FIXME: do these
56                            "ltT", # ltTMatrix_validate missing; as(*,"matrix")                            outer(c("l","n"), c("tT", "sT"), paste0),
57                            "lsT", # lsTMatrix_validate  "        "                            ## ltTMatrix_validate missing; as(*,"matrix")
   
58                            ""), "Matrix", sep='')                            ""), "Matrix", sep='')
59  ## From the rest, those that don't show :  ## From the rest, those that don't show :
60  no.show.classes <- paste(c("dgR", # only stub implementation  no.show.classes <-
61                             "dsR", # dito      paste(paste("d", Rcl.struc, sep=''), "Matrix", sep='')
                            "dtR", #  "  
                            ), "Matrix", sep='')  
62    
63  no.t.classes  <- no.show.classes # no t() available  no.t.classes  <- no.show.classes # no t() available
64  not.coerce0   <- no.show.classes # not coercable to   "matrix"  not.coerce0   <- no.show.classes # not coercable to   "matrix"

Legend:
Removed from v.1547  
changed lines
  Added in v.1548

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