SCM

SCM Repository

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

Diff of /pkg/Matrix/R/diagMatrix.R

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

revision 2195, Fri May 30 15:08:31 2008 UTC revision 2196, Fri May 30 21:49:50 2008 UTC
# Line 771  Line 771 
771    
772    
773  ## Not {"sparseMatrix", "numeric} :  {"denseMatrix", "matrix", ... }  ## Not {"sparseMatrix", "numeric} :  {"denseMatrix", "matrix", ... }
774    for(other in c("ANY", "Matrix", "dMatrix")) {
775  ## ddi*:  ## ddi*:
776  setMethod("Ops", signature(e1 = "ddiMatrix", e2 = "ANY"),      setMethod("Ops", signature(e1 = "ddiMatrix", e2 = other),
777            function(e1,e2) callGeneric(diag2tT.u(e1,e2, "d"), e2))            function(e1,e2) callGeneric(diag2tT.u(e1,e2, "d"), e2))
778  setMethod("Ops", signature(e1 = "ANY", e2 = "ddiMatrix"),      setMethod("Ops", signature(e1 = other, e2 = "ddiMatrix"),
779            function(e1,e2) callGeneric(e1, diag2tT.u(e2,e1, "d")))            function(e1,e2) callGeneric(e1, diag2tT.u(e2,e1, "d")))
780  ## ldi*:  ## ldi*:
781  setMethod("Ops", signature(e1 = "ldiMatrix", e2 = "ANY"),      setMethod("Ops", signature(e1 = "ldiMatrix", e2 = other),
782            function(e1,e2) callGeneric(diag2tT.u(e1,e2, "l"), e2))            function(e1,e2) callGeneric(diag2tT.u(e1,e2, "l"), e2))
783  setMethod("Ops", signature(e1 = "ANY", e2 = "ldiMatrix"),      setMethod("Ops", signature(e1 = other, e2 = "ldiMatrix"),
784            function(e1,e2) callGeneric(e1, diag2tT.u(e2,e1, "l")))            function(e1,e2) callGeneric(e1, diag2tT.u(e2,e1, "l")))
785    }
786  ## This should *not* dispatch to <dense> methods (in ./Ops.R ), as  ## This should *not* dispatch to <dense> methods (in ./Ops.R ), as
787  ##  FALSE & <anything> |-> FALSE : hence result should be diagonal:  ##  FALSE & <anything> |-> FALSE : hence result should be diagonal:
788  for(cl in diCls) {  for(cl in diCls) {

Legend:
Removed from v.2195  
changed lines
  Added in v.2196

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