SCM

SCM Repository

[matrix] View of /pkg/R/dpoMatrix.R
ViewVC logotype

View of /pkg/R/dpoMatrix.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 683 - (download) (annotate)
Thu Mar 31 17:10:16 2005 UTC (14 years, 2 months ago) by bates
File size: 1401 byte(s)
Moving methods for operations with numeric to the Matrix class and with integer to the dMatrix class
#### Positive-definite Symmetric Matrices -- Coercion and Methods

setAs("dpoMatrix", "dppMatrix",
      function(from) as(as(from, "dspMatrix"), "dppMatrix"))

setMethod("chol", signature(x = "dpoMatrix"),
          function(x, pivot, LINPACK)
          .Call("dpoMatrix_chol", x))

setMethod("rcond", signature(x = "dpoMatrix", type = "character"),
          function(x, type, ...)
          .Call("dpoMatrix_rcond", x, type),
          valueClass = "numeric")

setMethod("rcond", signature(x = "dpoMatrix", type = "missing"),
          function(x, type, ...)
          .Call("dpoMatrix_rcond", x, "O"),
          valueClass = "numeric")

setMethod("solve", signature(a = "dpoMatrix", b = "missing"),
          function(a, b, ...)
          .Call("dpoMatrix_solve", a),
          valueClass = "dpoMatrix")

setMethod("solve", signature(a = "dpoMatrix", b = "dgeMatrix"),
          function(a, b, ...)
          .Call("dpoMatrix_dgeMatrix_solve", a, b),
          valueClass = "dgeMatrix")

setMethod("solve", signature(a = "dpoMatrix", b = "matrix"),
          function(a, b, ...)
          .Call("dpoMatrix_matrix_solve", a, b),
          valueClass = "matrix")

##setMethod("solve", signature(a = "dpoMatrix", b = "numeric"),
##          function(a, b, ...)
##          as.numeric(.Call("dpoMatrix_matrix_solve",
##                           a, as.matrix(b))),
##          valueClass = "numeric")

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