https://github.com/cran/Matrix
Tip revision: 19d8be60dc060b41d422cf613c54b72b327e9986 authored by Doug and Martin on 16 August 2007, 00:00:00 UTC
version 0.999375-2
version 0.999375-2
Tip revision: 19d8be6
CHMfactor.R
setAs("CHMfactor", "sparseMatrix",
function(from) .Call(CHMfactor_to_sparse, from))
setAs("CHMfactor", "Matrix", function(from) as(from, "sparseMatrix"))
setMethod("image", "CHMfactor",
function(x, ...) {
x <- as(as(x, "sparseMatrix"), "dgTMatrix")
callGeneric()
})
.CHM_solve <-
function(a, b,
system = c("A", "LDLt", "LD", "DLt", "L", "Lt", "D", "P", "Pt"),
...)
.Call(CHMfactor_solve, a, b,
match(match.arg(system),
c("A", "LDLt", "LD", "DLt", "L", "Lt", "D", "P", "Pt"),
nomatch = 0))
setMethod("solve", signature(a = "CHMfactor", b = "ddenseMatrix"),
.CHM_solve, valueClass = "dgeMatrix")
setMethod("solve", signature(a = "CHMfactor", b = "matrix"),
.CHM_solve, valueClass = "dgeMatrix")
setMethod("solve", signature(a = "CHMfactor", b = "dsparseMatrix"),
function(a, b,
system = c("A", "LDLt", "LD", "DLt", "L", "Lt", "D", "P", "Pt"),
...)
.Call(CHMfactor_spsolve, a, as(b, "dgCMatrix"),
match(match.arg(system),
c("A", "LDLt", "LD", "DLt", "L", "Lt", "D", "P", "Pt"),
nomatch = 0)),
valueClass = "dgCMatrix")