SCM

SCM Repository

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

Diff of /pkg/R/Matrix.R

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

revision 682, Thu Mar 31 08:07:02 2005 UTC revision 683, Thu Mar 31 17:10:16 2005 UTC
# Line 103  Line 103 
103      as(val, "dgeMatrix")      as(val, "dgeMatrix")
104  }  }
105    
106    ## Methods for operations where one argument is numeric
107    
108    setMethod("%*%", signature(x = "Matrix", y = "numeric"),
109              function(x, y) callGeneric(x, array(y, c(length(y), 1))))
110    
111    setMethod("%*%", signature(x = "numeric", y = "Matrix"),
112              function(x, y) callGeneric(array(x, c(1, length(x))), y))
113    
114    setMethod("crossprod", signature(x = "Matrix", y = "numeric"),
115              function(x, y = NULL) callGeneric(x, array(y, c(length(y), 1))))
116    
117    setMethod("crossprod", signature(x = "numeric", y = "Matrix"),
118              function(x, y = NULL)  callGeneric(array(x, c(1, length(x))), y))
119    
120    setMethod("solve", signature(a = "Matrix", b = "numeric"),
121              function(a, b, ...) callGeneric(a, array(b, c(length(b), 1))))
122    
123  if(FALSE) { ##--- not-yet used -- {almost same code also in ./dgeMatrix.R }  if(FALSE) { ##--- not-yet used -- {almost same code also in ./dgeMatrix.R }
124    

Legend:
Removed from v.682  
changed lines
  Added in v.683

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