\HeaderA{BunchKaufman-methods}{Bunch-Kaufman Decomposition Methods}{BunchKaufman.Rdash.methods}
\aliasA{BunchKaufman}{BunchKaufman-methods}{BunchKaufman}
\aliasA{BunchKaufman,dspMatrix-method}{BunchKaufman-methods}{BunchKaufman,dspMatrix.Rdash.method}
\aliasA{BunchKaufman,dsyMatrix-method}{BunchKaufman-methods}{BunchKaufman,dsyMatrix.Rdash.method}
\keyword{methods}{BunchKaufman-methods}
\begin{Description}\relax
The Bunch-Kaufman Decomposition of a square symmetric matrix \eqn{A}{}
is \eqn{A = P LDL' P'}{} where \eqn{P}{} is a permutation matrix, \eqn{L}{}
is \emph{unit}-lower triangular and \eqn{D}{} is \emph{block}-diagonal
with blocks of dimension \eqn{1\times 1}{} or \eqn{2\times2}{}.
\end{Description}
\begin{Usage}
\begin{verbatim}
BunchKaufman(x, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a symmetric square matrix.
\item[\code{...}] potentially further arguments passed to methods.
\end{ldescription}
\end{Arguments}
\begin{Section}{Methods}
Currently, only methods for \bold{dense} numeric symmetric matrices
are implemented.
\describe{
\item[\code{x = "dspMatrix"}] ...
\item[\code{x = "dsyMatrix"}] ...
}
These rely on the Lapack routines \code{dsptrf} and
\code{dsytrf}, respectively.
\end{Section}
\begin{SeeAlso}\relax
The resulting class, \code{\LinkA{BunchKaufman}{BunchKaufman.Rdash.class}}.
Related decompositions are the LU,  \code{\LinkA{lu}{lu}}, and the Cholesky,
\code{\LinkA{chol}{chol}} (and for \emph{sparse} matrices,
\code{\LinkA{Cholesky}{Cholesky}}).
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(CAex)
dim(CAex)
isSymmetric(CAex)# TRUE
CAs <- as(CAex, "symmetricMatrix")
if(FALSE) # no method defined yet for *sparse* :
   bk. <- BunchKaufman(CAs)
## does apply to *dense* symmetric matrices:
bkCA <- BunchKaufman(as(CAs, "denseMatrix"))
bkCA
\end{ExampleCode}
\end{Examples}

