Rev 4994 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{CHMfactor-class}\title{CHOLMOD-based Cholesky Factorizations}\docType{class}\alias{CHMfactor-class}% "mother" virtual\alias{CHMsimpl-class}% virtual\alias{CHMsuper-class}% virtual\alias{dCHMsimpl-class}\alias{nCHMsimpl-class}\alias{dCHMsuper-class}\alias{nCHMsuper-class}%\alias{coerce,CHMfactor,Matrix-method}\alias{coerce,CHMfactor,sparseMatrix-method}\alias{solve,CHMfactor,ddenseMatrix-method}\alias{solve,CHMfactor,dsparseMatrix-method}\alias{solve,CHMfactor,numeric-method}\alias{solve,CHMfactor,matrix-method}\alias{solve,CHMfactor,ANY-method}\alias{determinant,CHMfactor,missing-method}\alias{determinant,CHMfactor,logical-method}\alias{update,CHMfactor-method}%\description{The virtual class \code{"CHMfactor"} is a class ofCHOLMOD-based Cholesky factorizations of symmetric, sparse,compressed, column-oriented matrices. Such a factorization issimplicial (virtual class \code{"CHMsimpl"}) or supernodal (virtualclass \code{"CHMsuper"}). Objects that inherit from these classes areeither numeric factorizations (classes \code{"dCHMsimpl"} and\code{"dCHMsuper"}) or symbolic factorizations (classes\code{"nCHMsimpl"} and \code{"nCHMsuper"}).}\usage{% want usage for the update method which has "surprising arguments"\S4method{update}{CHMfactor}(object, parent, mult = 0, \dots)}\arguments{\item{object}{a \code{"CHMfactor"} object.}\item{parent}{a \code{"\linkS4class{dsCMatrix}"} matrix or\code{"\linkS4class{dgCMatrix}"} object with the same nonzeropattern as the matrix that generated \code{object}. If\code{parent} is a symmetric matrix (class\code{"\linkS4class{dsCMatrix}"}) then \code{object} should be adecomposition of a matrix with the same nonzero pattern as\code{parent}. If \code{parent} is not symmetric then \code{object}should be the decomposition of a matrix with the same nonzeropattern as \code{tcrossprod(parent)}.}\item{mult}{a numeric scalar (default 0). \code{mult} times theidentity matrix is (implicitly) added to \code{parent} or\code{tcrossprod(parent)} before updating the decomposition\code{object}.}\item{\dots}{Optional additional arguments to the methods.}}\section{Objects from the Class}{Objects can be created by calls of the form \code{new("dCHMsuper", ...)}but are more commonly created via \code{\link{Cholesky}()},applied to \code{\linkS4class{dsCMatrix}} or\code{\linkS4class{lsCMatrix}} objects.}\section{Slots}{of \code{"CHMfactor"} and all classes inheriting from it:\describe{\item{\code{perm}:}{An integer vector giving the 0-basedpermutation of the rows and columns chosen to reduce fill-in andfor post-ordering.}\item{\code{colcount}:}{Object of class \code{"integer"} .... }%% FIXME\item{\code{type}:}{Object of class \code{"integer"} .... }}Slots of the non virtual classes \dQuote{[dl]CHM(super|simpl)}:\describe{\item{\code{p}:}{Object of class \code{"integer"} of pointers, onefor each column, to the initial (zero-based) index of elements inthe column. Only present in classes that contain \code{"CHMsimpl"}.}\item{\code{i}:}{Object of class \code{"integer"} of length nnzero(number of non-zero elements). These are the row numbers foreach non-zero element in the matrix. Only present in classes thatcontain \code{"CHMsimpl"}.}\item{\code{x}:}{For the \code{"d*"} classes: \code{"numeric"} - thenon-zero elements of the matrix.}}}\section{Methods}{\describe{\item{coerce}{\code{signature(from = "CHMfactor", to = "sparseMatrix")}}\item{image}{\code{signature(x = "CHMfactor")}}\item{solve}{\code{signature(a = "CHMfactor", b = "ddenseMatrix")}The \code{solve} methods for a \code{"CHMfactor"} object take anoptional third argument \code{system} whose value can be one of thecharacter strings \code{"A"}, \code{"LDLt"}, \code{"LD"},\code{"DLt"}, \code{"L"}, \code{"Lt"}, \code{"D"}, \code{"P"} or\code{"Pt"}. This argument describes the system to be solved. Thedefault is to solve \code{Ax = b} for \code{x} where \code{A} issparse, positive-definite matrix that was factored to produce\code{"a"}.}\item{solve}{\code{signature(a = "CHMfactor", b = "matrix")}, and}\item{solve}{\code{signature(a = "CHMfactor", b = "numeric")} callthe above \code{signature(*, b = "ddenseMatrix")} method.}\item{solve}{\code{signature(a = "CHMfactor", b = "dsparseMatrix")}takes the same third argument \code{system} and calls thecorresponding sparse CHOLMOD algorithm.}\item{determinant}{\code{signature(x = "CHMfactor", logarithm ="logical")} returns the determinant (or the logarithm of thedeterminant, if \code{logarithm = TRUE}, the default) of \emph{thematrix whose decomposition is represented by} \code{x}. Thedeterminant of the decomposition is not well defined because thedecomposition may be \dQuote{LDL'} or \dQuote{LL'}. Thedeterminant of the original matrix that was decomposed is welldefined.}\item{update}{\code{signature(object = "CHMfactor")}. The\code{\link{update}} method requires an additional argument\code{parent}, which is a \code{"\linkS4class{dsCMatrix}"} object withthe same structure of nonzeros as the matrix that was decomposedto produce \code{object}, and provides an optional argument\code{mult}, a numeric scalar. This method updates the numericvalues in \code{object} to the decomposition of \eqn{A+mI} where\eqn{A} is the matrix represented by \code{parent} and \eqn{m} isthe scalar \code{mult}. Because only the numeric values areupdated this method should be faster than creating and decomposing\eqn{A+mI}. It is not uncommon to want, say, the determinant of\eqn{A+mI} for many different values of \eqn{m}. This methodwould be the preferred approach in such cases.}}}%\references{}%\author{}%\note{}\seealso{\code{\link{Cholesky}}, also for examples;class \code{\linkS4class{dgCMatrix}}.}%\examples{} are in ./Cholesky.Rd\keyword{classes}\keyword{algebra}