SCM

SCM Repository

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

Diff of /pkg/R/pMatrix.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                    Dimnames = rev(a@Dimnames))                    Dimnames = rev(a@Dimnames))
34            }, valueClass = "pMatrix")            }, valueClass = "pMatrix")
35    
   
36  setMethod("t", signature(x = "pMatrix"), function(x) solve(x))  setMethod("t", signature(x = "pMatrix"), function(x) solve(x))
37    
38  setMethod("%*%", signature(x = "matrix", y = "pMatrix"),  setMethod("%*%", signature(x = "matrix", y = "pMatrix"),
# Line 51  Line 50 
50                x                x
51            })            })
52    
53  ## FIXME: the following methods can be rewritten when "[" methods for  setMethod("%*%", signature(x = "Matrix", y = "pMatrix"),
54  ## dgeMatrix are available            function(x, y) x[, y@perm])
55    
56  setMethod("%*%", signature(x = "dgeMatrix", y = "pMatrix"),  setMethod("%*%", signature(x = "pMatrix", y = "Matrix"),
57            function(x, y) as(callGeneric(x, as(y, "matrix")), "dgeMatrix"),            function(x, y) y[x@perm , ])
           valueClass = "dgeMatrix")  
   
 setMethod("%*%", signature(x = "pMatrix", y = "dgeMatrix"),  
           function(x, y) as(callGeneric(as(x, "matrix"), y), "dgeMatrix"),  
           valueClass = "dgeMatrix")  

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