SCM

SCM Repository

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

Diff of /pkg/R/dgeMatrix.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 152  Line 152 
152  setMethod("crossprod", signature(x = "dgeMatrix", y = "matrix"),  setMethod("crossprod", signature(x = "dgeMatrix", y = "matrix"),
153            function(x, y = NULL) .Call("dgeMatrix_matrix_crossprod", x, y),            function(x, y = NULL) .Call("dgeMatrix_matrix_crossprod", x, y),
154            valueClass = "dgeMatrix")            valueClass = "dgeMatrix")
155  setMethod("crossprod", signature(x = "dgeMatrix", y = "numeric"),  ##setMethod("crossprod", signature(x = "dgeMatrix", y = "numeric"),
156            function(x, y = NULL)  ##          function(x, y = NULL)
157            .Call("dgeMatrix_matrix_crossprod", x, as.matrix(y)),  ##          .Call("dgeMatrix_matrix_crossprod", x, as.matrix(y)),
158            valueClass = "dgeMatrix")  ##          valueClass = "dgeMatrix")
159  setMethod("crossprod", signature(x = "matrix", y = "dgeMatrix"),  setMethod("crossprod", signature(x = "matrix", y = "dgeMatrix"),
160            function(x, y = NULL) callGeneric(as(x, "dgeMatrix"), y),            function(x, y = NULL) callGeneric(as(x, "dgeMatrix"), y),
161            valueClass = "dgeMatrix")            valueClass = "dgeMatrix")
162  setMethod("crossprod", signature(x = "numeric", y = "dgeMatrix"),  ##setMethod("crossprod", signature(x = "numeric", y = "dgeMatrix"),
163            function(x, y = NULL) callGeneric(as.matrix(x), y),  ##          function(x, y = NULL) callGeneric(as.matrix(x), y),
164            valueClass = "dgeMatrix")  ##          valueClass = "dgeMatrix")
165    
166  setMethod("%*%", signature(x = "dgeMatrix", y = "dgeMatrix"),  setMethod("%*%", signature(x = "dgeMatrix", y = "dgeMatrix"),
167            function(x, y) .Call("dgeMatrix_matrix_mm", x, y, TRUE, FALSE),            function(x, y) .Call("dgeMatrix_matrix_mm", x, y, TRUE, FALSE),
# Line 178  Line 178 
178            valueClass = "dgeMatrix")            valueClass = "dgeMatrix")
179    
180  ## dgeMatrix <-> numeric : uses the "matrix" one  ## dgeMatrix <-> numeric : uses the "matrix" one
181  setMethod("%*%", signature(x = "dgeMatrix", y = "numeric"),  ##setMethod("%*%", signature(x = "dgeMatrix", y = "numeric"),
182            function(x, y)  ##          function(x, y)
183            .Call("dgeMatrix_matrix_mm", x, as.matrix(y), FALSE, FALSE),  ##          .Call("dgeMatrix_matrix_mm", x, as.matrix(y), FALSE, FALSE),
184            valueClass = "dgeMatrix")  ##          valueClass = "dgeMatrix")
185    
186  setMethod("%*%", signature(x = "numeric", y = "dgeMatrix"),  ##setMethod("%*%", signature(x = "numeric", y = "dgeMatrix"),
187            function(x, y)  ##          function(x, y)
188            .Call("dgeMatrix_matrix_mm", y, rbind(x), FALSE, TRUE),  ##          .Call("dgeMatrix_matrix_mm", y, rbind(x), FALSE, TRUE),
189            valueClass = "dgeMatrix")  ##          valueClass = "dgeMatrix")
190    
191  setMethod("diag", signature(x = "dgeMatrix"),  setMethod("diag", signature(x = "dgeMatrix"),
192            function(x = 1, nrow, ncol = n)            function(x = 1, nrow, ncol = n)
# Line 215  Line 215 
215            function(a, b, ...) .Call("dgeMatrix_matrix_solve", a, b, TRUE),            function(a, b, ...) .Call("dgeMatrix_matrix_solve", a, b, TRUE),
216            valueClass = "dgeMatrix")            valueClass = "dgeMatrix")
217    
218  setMethod("solve", signature(a = "dgeMatrix", b = "numeric"),  ##setMethod("solve", signature(a = "dgeMatrix", b = "numeric"),
219            function(a, b, ...) .Call("dgeMatrix_matrix_solve", a, as.matrix(b), TRUE),  ##          function(a, b, ...) .Call("dgeMatrix_matrix_solve", a, as.matrix(b), TRUE),
220            valueClass = "dgeMatrix")  ##          valueClass = "dgeMatrix")
221    
222  setMethod("lu", signature(x = "dgeMatrix"),  setMethod("lu", signature(x = "dgeMatrix"),
223            function(x, ...) .Call("dgeMatrix_LU", x), valueClass = "LU")            function(x, ...) .Call("dgeMatrix_LU", x), valueClass = "LU")

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