\HeaderA{unpack}{Full Storage Representation of Packed Matrices}{unpack}
\keyword{array}{unpack}
\keyword{algebra}{unpack}
\begin{Description}\relax
Expands decompositions stored in compact form into matrix factors.
\end{Description}
\begin{Usage}
\begin{verbatim}
unpack(x, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a matrix stored in packed form, e.g., of class \code{"d?pMatrix"}
where "?" is "t" for triangular or "s" for symmetric.

\item[\code{...}] further arguments passed to or from other methods.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This is a generic function with special methods for different types
of packed matrices.  Use \code{\LinkA{showMethods}{showMethods}("unpack")} to list
the methods for \code{unpack()}.
\end{Details}
\begin{Value}
A \code{Matrix} object containing the full-storage representation of
\code{x}.
\end{Value}
\begin{Examples}
\begin{ExampleCode}
showMethods("unpack")
(cp4 <- chol(Hilbert(4))) # is triangular
tp4 <- as(cp4,"dtpMatrix")# [t]riangular [p]acked
str(tp4)
(unpack(tp4))

## Not run: 
## once we have Diagonal() :
unpack(Diagonal( 1:3))
## End(Not run)
\end{ExampleCode}
\end{Examples}

