SCM

SCM Repository

[matrix] Diff of /pkg/R/dMatrix.R
ViewVC logotype

Diff of /pkg/R/dMatrix.R

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

revision 1328, Fri Jul 21 06:46:36 2006 UTC revision 1329, Fri Jul 21 06:47:06 2006 UTC
# Line 68  Line 68 
68                x                x
69            })            })
70    
71    ## round(x) == round(x, 0)  etc
72    setMethod("Math2",
73              signature(x = "dMatrix", digits = "missing"),
74              function(x, digits) callGeneric(x, digits = 0))
75    
76  ## This needs extra work in ./AllGeneric.R :  ## This needs extra work in ./AllGeneric.R :
77  setMethod("Summary", signature(x = "dMatrix", na.rm = "ANY"),  setMethod("Summary", signature(x = "dMatrix", na.rm = "ANY"),
78            function(x, ..., na.rm) callGeneric(x@x, ..., na.rm = na.rm))            function(x, ..., na.rm) callGeneric(x@x, ..., na.rm = na.rm))
# Line 82  Line 87 
87    
88  setMethod("Compare", signature(e1 = "dMatrix", e2 = "numeric"),  setMethod("Compare", signature(e1 = "dMatrix", e2 = "numeric"),
89            function(e1, e2) {            function(e1, e2) {
90                lClass <- dClass2(class(e1), "l")                lClass <- class2(class(e1), "l")
91                fullCl <- if(isSymmetric(e1)) "lsyMatrix" else "lgeMatrix"                fullCl <- if(isSymmetric(e1)) "lsyMatrix" else "lgeMatrix"
92                ## Dbg cat("Compare", class(e1), "|-> ",lClass, "\n")                ## Dbg cat("Compare", class(e1), "|-> ",lClass, "\n")
93                r  <- callGeneric(e1@x, e2)                r  <- callGeneric(e1@x, e2)
# Line 125  Line 130 
130  setMethod("Compare", signature(e1 = "dMatrix", e2 = "dMatrix"),  setMethod("Compare", signature(e1 = "dMatrix", e2 = "dMatrix"),
131            function(e1, e2) {            function(e1, e2) {
132                d <- dimCheck(e1,e2)                d <- dimCheck(e1,e2)
133                lClass <- dClass2(class(e1), "l")                lClass <- class2(class(e1), "l")
134    
135                ## FIXME: if (the 'x' are slots compatible)                ## FIXME: if (the 'x' are slots compatible)
136                r <- callGeneric(e1@x, e2@x)                r <- callGeneric(e1@x, e2@x)

Legend:
Removed from v.1328  
changed lines
  Added in v.1329

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