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 2132, Fri Mar 14 23:32:33 2008 UTC revision 2133, Sat Mar 15 18:56:50 2008 UTC
# Line 327  Line 327 
327  setMethod("symmpart", signature(x = "diagonalMatrix"), function(x) x)  setMethod("symmpart", signature(x = "diagonalMatrix"), function(x) x)
328  setMethod("skewpart", signature(x = "diagonalMatrix"), setZero)  setMethod("skewpart", signature(x = "diagonalMatrix"), setZero)
329    
330  setMethod("chol", signature(x = "ddiMatrix"),# pivot = "ANY"  setMethod("chol", signature(x = "ddiMatrix"),
331            function(x, pivot) {            function(x, pivot, ...) {
332                if(any(x@x < 0)) stop("chol() is undefined for diagonal matrix with negative entries")                if(any(x@x < 0))
333                      stop("chol() is undefined for diagonal matrix with negative entries")
334                x@x <- sqrt(x@x)                x@x <- sqrt(x@x)
335                x                x
336            })            })
337  ## chol(L) is L for logical diagonal:  ## chol(L) is L for logical diagonal:
338  setMethod("chol", signature(x = "ldiMatrix"), function(x, pivot) x)  setMethod("chol", signature(x = "ldiMatrix"), function(x, pivot, ...) x)
339    
340  ## Basic Matrix Multiplication {many more to add}  ## Basic Matrix Multiplication {many more to add}
341  ##       ---------------------  ##       ---------------------

Legend:
Removed from v.2132  
changed lines
  Added in v.2133

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