\HeaderA{CAex}{Albers' example Matrix with "Difficult" Eigen Factorization}{CAex}
\keyword{datasets}{CAex}
\begin{Description}\relax
An example of a sparse matrix for which \code{\LinkA{eigen}{eigen}()} seemed
to be difficult, an unscaled version of this has been posted to the
web, accompanying an E-mail to R-help
(\url{https://stat.ethz.ch/mailman/listinfo/r-help}), by
Casper J Albers, Open University, UK.
\end{Description}
\begin{Usage}
\begin{verbatim}data(CAex)\end{verbatim}
\end{Usage}
\begin{Format}\relax
This is a \eqn{72 \times 72}{} symmetric matrix with 216
non-zero entries in five bands, stored as sparse matrix of class
\code{\LinkA{dgCMatrix}{dgCMatrix.Rdash.class}}.
\end{Format}
\begin{Details}\relax
In some versions of \R, \code{\LinkA{eigen}{eigen}(CAex)} fell into an
infinite loop (whereas \code{\LinkA{eigen}{eigen}(CAex, EISPACK=TRUE)} has
been okay).
\end{Details}
\begin{Examples}
\begin{ExampleCode}
data(CAex)
str(CAex) # of class "dgCMatrix"

image(CAex)# -> it's a simple band matrix with 5 bands
## and the eigen values are basically 1 (42 times) and 0 (30 x):
zapsmall(ev <- eigen(CAex, EISPACK=TRUE, only.values=TRUE)$values)
## i.e., the matrix is symmetric, hence
sCA <- as(CAex, "symmetricMatrix")
## and
stopifnot(class(sCA) == "dsCMatrix",
          as(sCA, "matrix") == as(CAex, "matrix"))
\end{ExampleCode}
\end{Examples}

