The R Project SVN R-packages

Rev

Rev 4975 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4975 Rev 5013
Line 19... Line 19...
19
	  function(x, y = NULL) crossprod(x, as(y, "dgCMatrix")))
19
	  function(x, y = NULL) crossprod(x, as(y, "dgCMatrix")))
20
 
20
 
21
setMethod("image", "dsparseMatrix",
21
setMethod("image", "dsparseMatrix",
22
	  function(x, ...) image(as(x, "dgTMatrix"), ...))
22
	  function(x, ...) image(as(x, "dgTMatrix"), ...))
23
 
23
 
24
setMethod("chol", signature(x = "dsparseMatrix", pivot = "ANY"),
24
setMethod("chol", signature(x = "dsparseMatrix"),
25
           function(x, pivot, ...) {
25
	   function(x, pivot=FALSE, ...) {
26
               px <- as(x, "dsCMatrix")
26
	       px <- as(x, "dsCMatrix")
27
               if (isTRUE(validObject(px, test=TRUE))) chol(px, pivot)
27
	       if (isTRUE(validObject(px, test=TRUE))) chol(px, pivot, ...)
28
               else stop("'x' is not positive definite -- chol() undefined.")
28
	       else stop("'x' is not positive definite -- chol() undefined.")
29
           })
29
	   })
30
 
30
 
31
setMethod("lu", signature(x = "dsparseMatrix"),
31
setMethod("lu", signature(x = "dsparseMatrix"),
32
	  function(x, ...) lu(as(x, "dgCMatrix")))
32
	  function(x, ...) lu(as(x, "dgCMatrix")))
33
 
33
 
34
 
34