SCM

SCM Repository

[matrix] View of /pkg/Matrix/R/LU.R
ViewVC logotype

View of /pkg/Matrix/R/LU.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2586 - (download) (annotate)
Sun Jul 25 02:32:06 2010 UTC (9 years, 1 month ago) by mmaechler
File size: 524 byte(s)
move Matrix/ directory "down"
setMethod("expand", signature(x = "denseLU"),
	  function(x, ...) .Call(LU_expand, x))

setMethod("solve", signature(a = "denseLU", b = "missing"),
	  function(a, b, ...) {
	      ll <- expand(a) #-> list(L, U, P); orig  x = P %*% L %*% U
	      ## too expensive: with(lapply(ll, solve), U %*% L %*% P)
	      solve(ll$U, solve(ll$L, ll$P))
	  })

setMethod("expand", signature(x = "sparseLU"),
	  function(x, ...)
	  list(P = as(x@p + 1L, "pMatrix"),
	       L = x@L,
	       U = x@U,
	       Q = as(x@q + 1L, "pMatrix")))

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