SCM

SCM Repository

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

Diff of /pkg/Matrix/R/ddenseMatrix.R

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

revision 1087, Fri Dec 9 20:55:39 2005 UTC revision 1331, Sat Jul 22 17:59:53 2006 UTC
# Line 64  Line 64 
64            function(x, vectors, ...) callGeneric(as(x, "dgeMatrix"), vectors))            function(x, vectors, ...) callGeneric(as(x, "dgeMatrix"), vectors))
65    
66    
67  ### NAMESPACE must export this -- also only for R version 2.2.x:  ## Cheap version: work via "dgeMatrix" and use the group methods there:
68  if(paste(R.version$major, R.version$minor, sep=".") >= "2.2") {  ## FIXME(?): try to preserve "symmetric", "triangular", ...
69      ## for R 2.2.x (and later):  setMethod("Arith", ##  "+", "-", "*", "^", "%%", "%/%", "/"
70              signature(e1 = "ddenseMatrix", e2 = "ddenseMatrix"),
71              function(e1, e2) callGeneric(as(e1, "dgeMatrix"),
72                                           as(e2, "dgeMatrix")))
73    setMethod("Arith",
74              signature(e1 = "ddenseMatrix", e2 = "numeric"),
75              function(e1, e2) callGeneric(as(e1, "dgeMatrix"), e2))
76    setMethod("Arith",
77              signature(e1 = "numeric", e2 = "ddenseMatrix"),
78              function(e1, e2) callGeneric(e1, as(e2, "dgeMatrix")))
79    
80    setMethod("Math",
81              signature(x = "ddenseMatrix"),
82              function(x) callGeneric(as(x, "dgeMatrix")))
83    
84    
85    
86    ### for R 2.2.x (and later): -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
87    
88  ### cbind2  ### cbind2
89      setMethod("cbind2", signature(x = "ddenseMatrix", y = "numeric"),      setMethod("cbind2", signature(x = "ddenseMatrix", y = "numeric"),
# Line 168  Line 185 
185                    new("dgeMatrix", Dim = c(nrx + nry, nc), Dimnames = dn,                    new("dgeMatrix", Dim = c(nrx + nry, nc), Dimnames = dn,
186                        x = c(rbind2(as(x,"matrix"), as(y,"matrix"))))                        x = c(rbind2(as(x,"matrix"), as(y,"matrix"))))
187                })                })
   
 }## R-2.2.x ff  

Legend:
Removed from v.1087  
changed lines
  Added in v.1331

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