\HeaderA{dpoMatrix-class}{Positive Semi-definite Dense Numeric Matrices}{dpoMatrix.Rdash.class}
\aliasA{coerce,dpoMatrix,corMatrix-method}{dpoMatrix-class}{coerce,dpoMatrix,corMatrix.Rdash.method}
\aliasA{coerce,dpoMatrix,dppMatrix-method}{dpoMatrix-class}{coerce,dpoMatrix,dppMatrix.Rdash.method}
\aliasA{coerce,dpoMatrix,lMatrix-method}{dpoMatrix-class}{coerce,dpoMatrix,lMatrix.Rdash.method}
\aliasA{coerce,dpoMatrix,nMatrix-method}{dpoMatrix-class}{coerce,dpoMatrix,nMatrix.Rdash.method}
\aliasA{coerce,dppMatrix,dpoMatrix-method}{dpoMatrix-class}{coerce,dppMatrix,dpoMatrix.Rdash.method}
\aliasA{coerce,dppMatrix,lMatrix-method}{dpoMatrix-class}{coerce,dppMatrix,lMatrix.Rdash.method}
\aliasA{coerce,dppMatrix,nMatrix-method}{dpoMatrix-class}{coerce,dppMatrix,nMatrix.Rdash.method}
\aliasA{coerce,dspMatrix,dpoMatrix-method}{dpoMatrix-class}{coerce,dspMatrix,dpoMatrix.Rdash.method}
\aliasA{coerce,dspMatrix,dppMatrix-method}{dpoMatrix-class}{coerce,dspMatrix,dppMatrix.Rdash.method}
\aliasA{coerce,Matrix,corMatrix-method}{dpoMatrix-class}{coerce,Matrix,corMatrix.Rdash.method}
\aliasA{coerce,matrix,corMatrix-method}{dpoMatrix-class}{coerce,matrix,corMatrix.Rdash.method}
\aliasA{coerce,Matrix,dpoMatrix-method}{dpoMatrix-class}{coerce,Matrix,dpoMatrix.Rdash.method}
\aliasA{coerce,matrix,dpoMatrix-method}{dpoMatrix-class}{coerce,matrix,dpoMatrix.Rdash.method}
\aliasA{coerce,Matrix,dppMatrix-method}{dpoMatrix-class}{coerce,Matrix,dppMatrix.Rdash.method}
\aliasA{coerce,matrix,dppMatrix-method}{dpoMatrix-class}{coerce,matrix,dppMatrix.Rdash.method}
\aliasA{corMatrix-class}{dpoMatrix-class}{corMatrix.Rdash.class}
\aliasA{determinant,dpoMatrix,logical-method}{dpoMatrix-class}{determinant,dpoMatrix,logical.Rdash.method}
\aliasA{determinant,dppMatrix,logical-method}{dpoMatrix-class}{determinant,dppMatrix,logical.Rdash.method}
\aliasA{dppMatrix-class}{dpoMatrix-class}{dppMatrix.Rdash.class}
\aliasA{rcond,dpoMatrix,character-method}{dpoMatrix-class}{rcond,dpoMatrix,character.Rdash.method}
\aliasA{rcond,dpoMatrix,missing-method}{dpoMatrix-class}{rcond,dpoMatrix,missing.Rdash.method}
\aliasA{rcond,dppMatrix,character-method}{dpoMatrix-class}{rcond,dppMatrix,character.Rdash.method}
\aliasA{rcond,dppMatrix,missing-method}{dpoMatrix-class}{rcond,dppMatrix,missing.Rdash.method}
\aliasA{solve,dpoMatrix,dgeMatrix-method}{dpoMatrix-class}{solve,dpoMatrix,dgeMatrix.Rdash.method}
\aliasA{solve,dpoMatrix,matrix-method}{dpoMatrix-class}{solve,dpoMatrix,matrix.Rdash.method}
\aliasA{solve,dpoMatrix,missing-method}{dpoMatrix-class}{solve,dpoMatrix,missing.Rdash.method}
\aliasA{solve,dpoMatrix,numeric-method}{dpoMatrix-class}{solve,dpoMatrix,numeric.Rdash.method}
\aliasA{solve,dppMatrix,dgeMatrix-method}{dpoMatrix-class}{solve,dppMatrix,dgeMatrix.Rdash.method}
\aliasA{solve,dppMatrix,integer-method}{dpoMatrix-class}{solve,dppMatrix,integer.Rdash.method}
\aliasA{solve,dppMatrix,matrix-method}{dpoMatrix-class}{solve,dppMatrix,matrix.Rdash.method}
\aliasA{solve,dppMatrix,missing-method}{dpoMatrix-class}{solve,dppMatrix,missing.Rdash.method}
\aliasA{solve,dppMatrix,numeric-method}{dpoMatrix-class}{solve,dppMatrix,numeric.Rdash.method}
\aliasA{t,dppMatrix-method}{dpoMatrix-class}{t,dppMatrix.Rdash.method}
\keyword{classes}{dpoMatrix-class}
\keyword{algebra}{dpoMatrix-class}
\begin{Description}\relax
The \code{"dpoMatrix"} class is the class of
positive-semidefinite symmetric matrices in nonpacked storage.
The \code{"dppMatrix"} class is the same except in packed storage.
Only the upper triangle or the lower triangle is required to be
available.

The \code{"corMatrix"} class extends \code{"dpoMatrix"} with a slot \code{sd}.
\end{Description}
\begin{Section}{Objects from the Class}
Objects can be created by calls of the
form \code{new("dpoMatrix", ...)} or from \code{crossprod} applied to
an \code{"dgeMatrix"} object.
\end{Section}
\begin{Section}{Slots}
\describe{
\item[\code{uplo}:] Object of class \code{"character"}. Must be
either "U", for upper triangular, and "L", for lower triangular.
\item[\code{x}:] Object of class \code{"numeric"}. The numeric
values that constitute the matrix, stored in column-major order.
\item[\code{Dim}:] Object of class \code{"integer"}. The dimensions
of the matrix which must be a two-element vector of non-negative
integers.
\item[\code{Dimnames}:] inherited from class \code{"Matrix"}
\item[\code{factors}:] Object of class \code{"list"}.  A named
list of factorizations that have been computed for the matrix.

\item[\code{sd}:] (for \code{"corMatrix"}) a \code{\LinkA{numeric}{numeric}}
vector of length \code{n} containing the (original)
\eqn{\sqrt{var(.)}}{} entries which allow
reconstruction of a covariance matrix from the correlation matrix.
}
\end{Section}
\begin{Section}{Extends}
Class \code{"dsyMatrix"}, directly.\\
Classes \code{"dgeMatrix"}, \code{"symmetricMatrix"}, and many more
by class \code{"dsyMatrix"}.
\end{Section}
\begin{Section}{Methods}
\describe{
\item[chol] \code{signature(x = "dpoMatrix")}:
Returns (and stores) the Cholesky decomposition of \code{x}, see
\code{\LinkA{chol}{chol}}.
\item[rcond] \code{signature(x = "dpoMatrix", norm = "character")}:
Returns (and stores) the reciprocal of the condition number of
\code{x}.  The \code{norm} can be \code{"O"} for the
one-norm (the default) or \code{"I"} for the infinity-norm.  For
symmetric matrices the result does not depend on the norm.
\item[solve] \code{signature(a = "dpoMatrix", b = "missing")}:
Return the inverse of \code{a}.
\item[solve] \code{signature(a = "dpoMatrix", b = "numeric")}:
Solve the linear system defined by \code{a} and \code{b}, where
\code{b} can be a numeric vector, or a matrix, or a dgeMatrix
object.  The Cholesky decomposition of \code{a} is calculated (if
needed) while solving the system.
}
\end{Section}
\begin{SeeAlso}\relax
Classes \code{\LinkA{dsyMatrix}{dsyMatrix.Rdash.class}} and \code{\LinkA{dgeMatrix}{dgeMatrix.Rdash.class}};
further, \code{\LinkA{Matrix}{Matrix}}, \code{\LinkA{rcond}{rcond}},
\code{\LinkA{chol}{chol}}, \code{\LinkA{solve}{solve}}, \code{\LinkA{crossprod}{crossprod}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
h6 <- Hilbert(6)
rcond(h6)
str(h6)
solve(h6)
str(hp6 <- as(h6, "dppMatrix"))

### Note that  as(*, "corMatrix")  *scales* the matrix
(ch6 <- as(h6, "corMatrix"))
stopifnot(all.equal(ch6@sd^(-2), 2*(1:6)-1, tol= 1e-12))
chch <- chol(ch6)
stopifnot(identical(chch, ch6@factors$Cholesky),
          all(abs(crossprod(chch) - ch6) < 1e-10))
\end{ExampleCode}
\end{Examples}

