\HeaderA{nMatrix-class}{Class "nMatrix" of Non-zero Pattern Matrices}{nMatrix.Rdash.class}
\aliasA{Arith,nMatrix,numeric-method}{nMatrix-class}{Arith,nMatrix,numeric.Rdash.method}
\aliasA{Arith,numeric,nMatrix-method}{nMatrix-class}{Arith,numeric,nMatrix.Rdash.method}
\aliasA{coerce,dMatrix,nMatrix-method}{nMatrix-class}{coerce,dMatrix,nMatrix.Rdash.method}
\aliasA{coerce,lMatrix,nMatrix-method}{nMatrix-class}{coerce,lMatrix,nMatrix.Rdash.method}
\aliasA{coerce,matrix,nMatrix-method}{nMatrix-class}{coerce,matrix,nMatrix.Rdash.method}
\aliasA{coerce,nMatrix,dMatrix-method}{nMatrix-class}{coerce,nMatrix,dMatrix.Rdash.method}
\aliasA{coerce,nMatrix,lMatrix-method}{nMatrix-class}{coerce,nMatrix,lMatrix.Rdash.method}
\aliasA{coerce,nMatrix,matrix-method}{nMatrix-class}{coerce,nMatrix,matrix.Rdash.method}
\aliasA{Compare,nMatrix,nMatrix-method}{nMatrix-class}{Compare,nMatrix,nMatrix.Rdash.method}
\aliasA{Logic,Matrix,nMatrix-method}{nMatrix-class}{Logic,Matrix,nMatrix.Rdash.method}
\aliasA{Logic,nMatrix,Matrix-method}{nMatrix-class}{Logic,nMatrix,Matrix.Rdash.method}
\aliasA{Ops,lMatrix,nMatrix-method}{nMatrix-class}{Ops,lMatrix,nMatrix.Rdash.method}
\aliasA{Ops,nMatrix,lMatrix-method}{nMatrix-class}{Ops,nMatrix,lMatrix.Rdash.method}
\aliasA{Ops,nMatrix,numeric-method}{nMatrix-class}{Ops,nMatrix,numeric.Rdash.method}
\aliasA{Ops,numeric,nMatrix-method}{nMatrix-class}{Ops,numeric,nMatrix.Rdash.method}
\aliasA{show,nMatrix-method}{nMatrix-class}{show,nMatrix.Rdash.method}
\aliasA{Summary,nMatrix-method}{nMatrix-class}{Summary,nMatrix.Rdash.method}
\keyword{classes}{nMatrix-class}
\keyword{algebra}{nMatrix-class}
\begin{Description}\relax
The \code{nMatrix} class is the virtual \dQuote{mother} class of all
\emph{\bold{n}on-zero pattern} (or simply \emph{patter\bold{n}})
matrices in the \pkg{Matrix} package.
\end{Description}
\begin{Section}{Slots}
Common to \emph{all} matrix object in the package:
\describe{
\item[\code{Dim}:] Object of class \code{"integer"} - the dimensions
of the matrix - must be an integer vector with exactly two
non-negative values.
\item[\code{Dimnames}:] list of length two; each component
containing NULL or a \code{\LinkA{character}{character}} vector length
equal the corresponding \code{Dim} element.
}
\end{Section}
\begin{Section}{Methods}
There is a bunch of coercion methods (for \code{\LinkA{as}{as}(..)}), e.g.,
\describe{
\item[coerce] \code{signature(from = "nMatrix", to = "matrix")}: ... 
\item[coerce] \code{signature(from = "nMatrix", to = "dMatrix")}: ... 
\item[coerce] \code{signature(from = "nMatrix", to = "lMatrix")}: ... 

\item[coerce] \code{signature(from = "matrix", to = "nMatrix")}:
Note that these coercions (must) coerce \code{\LinkA{NA}{NA}}s to
non-zero, hence conceptually \code{TRUE}.
This is particularly important when
\code{\LinkA{sparseMatrix}{sparseMatrix.Rdash.class}} objects are coerced to
\code{"nMatrix"} and hence to \code{\LinkA{nsparseMatrix}{nsparseMatrix.Rdash.class}}.

\item[coerce] \code{signature(from = "dMatrix", to = "nMatrix")}: ... 
\item[coerce] \code{signature(from = "lMatrix", to = "nMatrix")}: ... 
}
\end{Section}
\begin{SeeAlso}\relax
The classes \code{\LinkA{lMatrix}{lMatrix.Rdash.class}},
\code{\LinkA{nsparseMatrix}{nsparseMatrix.Rdash.class}}, and the mother class,
\code{\LinkA{Matrix}{Matrix.Rdash.class}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
getClass("nMatrix")

L3 <- Matrix(upper.tri(diag(3)))
L3 # an "ltCMatrix"
as(L3, "nMatrix") # -> ntC*

## similar, not using Matrix()
as(upper.tri(diag(3)), "nMatrix")# currently "ngTMatrix"
\end{ExampleCode}
\end{Examples}

