SCM

SCM Repository

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

Diff of /pkg/R/dtCMatrix.R

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

revision 1386, Thu Aug 17 22:30:40 2006 UTC revision 1387, Thu Aug 17 22:31:34 2006 UTC
# Line 74  Line 74 
74    
75  setMethod("solve", signature(a = "dtCMatrix", b = "dgeMatrix"),  setMethod("solve", signature(a = "dtCMatrix", b = "dgeMatrix"),
76            function(a, b, ...) {            function(a, b, ...) {
77                if (a@diag == "U") a <- as(diagU2N(a), "dtCMatrix")  #             if (a@diag == "U") a <- as(diagU2N(a), "dtCMatrix")
78                  if (a@diag == "U") a <- .Call(Csparse_diagU2N, a)
79                .Call(dtCMatrix_matrix_solve, a, b, TRUE)                .Call(dtCMatrix_matrix_solve, a, b, TRUE)
80            }, valueClass = "dgeMatrix")            }, valueClass = "dgeMatrix")
81    
82  setMethod("solve", signature(a = "dtCMatrix", b = "matrix"),  setMethod("solve", signature(a = "dtCMatrix", b = "matrix"),
83            function(a, b, ...) {            function(a, b, ...) {
84                if (a@diag == "U") a <- as(diagU2N(a), "dtCMatrix")  #             if (a@diag == "U") a <- as(diagU2N(a), "dtCMatrix")
85                  if (a@diag == "U") a <- .Call(Csparse_diagU2N, a)
86                storage.mode(b) <- "double"                storage.mode(b) <- "double"
87                .Call(dtCMatrix_matrix_solve, a, b, FALSE)                .Call(dtCMatrix_matrix_solve, a, b, FALSE)
88            }, valueClass = "dgeMatrix")            }, valueClass = "dgeMatrix")
89    
90    ## Isn't this case handled by the method for (a = "Matrix', b =
91    ## "numeric") in ./Matrix.R? Or is this method defined here for
92    ## the as.double coercion?
93  setMethod("solve", signature(a = "dtCMatrix", b = "numeric"),  setMethod("solve", signature(a = "dtCMatrix", b = "numeric"),
94            function(a, b, ...) {            function(a, b, ...) {
95                if (a@diag == "U") a <- as(diagU2N(a), "dtCMatrix")                if (a@diag == "U") a <- as(diagU2N(a), "dtCMatrix")

Legend:
Removed from v.1386  
changed lines
  Added in v.1387

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