\HeaderA{CsparseMatrix-class}{Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form}{CsparseMatrix.Rdash.class}
\aliasA{.validateCsparse}{CsparseMatrix-class}{.validateCsparse}
\aliasA{Arith,CsparseMatrix,CsparseMatrix-method}{CsparseMatrix-class}{Arith,CsparseMatrix,CsparseMatrix.Rdash.method}
\aliasA{Arith,CsparseMatrix,numeric-method}{CsparseMatrix-class}{Arith,CsparseMatrix,numeric.Rdash.method}
\aliasA{Arith,numeric,CsparseMatrix-method}{CsparseMatrix-class}{Arith,numeric,CsparseMatrix.Rdash.method}
\aliasA{coerce,CsparseMatrix,denseMatrix-method}{CsparseMatrix-class}{coerce,CsparseMatrix,denseMatrix.Rdash.method}
\aliasA{coerce,CsparseMatrix,lMatrix-method}{CsparseMatrix-class}{coerce,CsparseMatrix,lMatrix.Rdash.method}
\aliasA{coerce,CsparseMatrix,lsparseMatrix-method}{CsparseMatrix-class}{coerce,CsparseMatrix,lsparseMatrix.Rdash.method}
\aliasA{coerce,CsparseMatrix,matrix-method}{CsparseMatrix-class}{coerce,CsparseMatrix,matrix.Rdash.method}
\aliasA{coerce,CsparseMatrix,nMatrix-method}{CsparseMatrix-class}{coerce,CsparseMatrix,nMatrix.Rdash.method}
\aliasA{coerce,CsparseMatrix,nsparseMatrix-method}{CsparseMatrix-class}{coerce,CsparseMatrix,nsparseMatrix.Rdash.method}
\aliasA{coerce,CsparseMatrix,TsparseMatrix-method}{CsparseMatrix-class}{coerce,CsparseMatrix,TsparseMatrix.Rdash.method}
\aliasA{coerce,matrix,CsparseMatrix-method}{CsparseMatrix-class}{coerce,matrix,CsparseMatrix.Rdash.method}
\aliasA{coerce,numeric,CsparseMatrix-method}{CsparseMatrix-class}{coerce,numeric,CsparseMatrix.Rdash.method}
\aliasA{Compare,CsparseMatrix,CsparseMatrix-method}{CsparseMatrix-class}{Compare,CsparseMatrix,CsparseMatrix.Rdash.method}
\aliasA{crossprod,CsparseMatrix,CsparseMatrix-method}{CsparseMatrix-class}{crossprod,CsparseMatrix,CsparseMatrix.Rdash.method}
\aliasA{crossprod,CsparseMatrix,ddenseMatrix-method}{CsparseMatrix-class}{crossprod,CsparseMatrix,ddenseMatrix.Rdash.method}
\aliasA{crossprod,CsparseMatrix,matrix-method}{CsparseMatrix-class}{crossprod,CsparseMatrix,matrix.Rdash.method}
\aliasA{crossprod,CsparseMatrix,missing-method}{CsparseMatrix-class}{crossprod,CsparseMatrix,missing.Rdash.method}
\aliasA{crossprod,CsparseMatrix,numeric-method}{CsparseMatrix-class}{crossprod,CsparseMatrix,numeric.Rdash.method}
\aliasA{crossprod,ddenseMatrix,CsparseMatrix-method}{CsparseMatrix-class}{crossprod,ddenseMatrix,CsparseMatrix.Rdash.method}
\aliasA{crossprod,matrix,CsparseMatrix-method}{CsparseMatrix-class}{crossprod,matrix,CsparseMatrix.Rdash.method}
\aliasA{diag,CsparseMatrix-method}{CsparseMatrix-class}{diag,CsparseMatrix.Rdash.method}
\aliasA{Logic,CsparseMatrix,CsparseMatrix-method}{CsparseMatrix-class}{Logic,CsparseMatrix,CsparseMatrix.Rdash.method}
\aliasA{Math,CsparseMatrix-method}{CsparseMatrix-class}{Math,CsparseMatrix.Rdash.method}
\aliasA{t,CsparseMatrix-method}{CsparseMatrix-class}{t,CsparseMatrix.Rdash.method}
\aliasA{tcrossprod,CsparseMatrix,CsparseMatrix-method}{CsparseMatrix-class}{tcrossprod,CsparseMatrix,CsparseMatrix.Rdash.method}
\aliasA{tcrossprod,CsparseMatrix,missing-method}{CsparseMatrix-class}{tcrossprod,CsparseMatrix,missing.Rdash.method}
\aliasA{\%*\%,CsparseMatrix,CsparseMatrix-method}{CsparseMatrix-class}{.Rpcent.*.Rpcent.,CsparseMatrix,CsparseMatrix.Rdash.method}
\aliasA{\%*\%,CsparseMatrix,ddenseMatrix-method}{CsparseMatrix-class}{.Rpcent.*.Rpcent.,CsparseMatrix,ddenseMatrix.Rdash.method}
\aliasA{\%*\%,CsparseMatrix,matrix-method}{CsparseMatrix-class}{.Rpcent.*.Rpcent.,CsparseMatrix,matrix.Rdash.method}
\aliasA{\%*\%,CsparseMatrix,numeric-method}{CsparseMatrix-class}{.Rpcent.*.Rpcent.,CsparseMatrix,numeric.Rdash.method}
\aliasA{\%*\%,ddenseMatrix,CsparseMatrix-method}{CsparseMatrix-class}{.Rpcent.*.Rpcent.,ddenseMatrix,CsparseMatrix.Rdash.method}
\aliasA{\%*\%,matrix,CsparseMatrix-method}{CsparseMatrix-class}{.Rpcent.*.Rpcent.,matrix,CsparseMatrix.Rdash.method}
\aliasA{\%*\%,numeric,CsparseMatrix-method}{CsparseMatrix-class}{.Rpcent.*.Rpcent.,numeric,CsparseMatrix.Rdash.method}
\keyword{classes}{CsparseMatrix-class}
\begin{Description}\relax
The \code{"CsparseMatrix"} class is the virtual class of
all sparse matrices coded in sorted compressed column-oriented form.
Since it is a virtual class, no objects may be created from it.  See
\code{showClass("CsparseMatrix")} for its subclasses.
\end{Description}
\begin{Section}{Slots}
\describe{
\item[\code{i}:] Object of class \code{"integer"} of length nnzero
(number of non-zero elements).  These are the \emph{0-based} row numbers for
each non-zero element in the matrix, i.e., \code{i} must be in
\code{0:(nrow(.)-1)}.
\item[\code{p}:] Object of class \code{"integer"} for providing pointers, one
for each column, to the initial (zero-based) index of elements in
the column.  \code{.@p} is of length \code{ncol(.) + 1}, with
\code{p[1] == 0} and \code{p[length(p)] == nnzero}, such that in
fact, \code{diff(.@p)} are the number of non-zero elements for
each column.
\item[\code{Dim}, \code{Dimnames}:] inherited from
the superclass, see the \code{\LinkA{sparseMatrix}{sparseMatrix.Rdash.class}} class.
}
\end{Section}
\begin{Section}{Extends}
Class \code{"sparseMatrix"}, directly.
Class \code{"Matrix"}, by class \code{"sparseMatrix"}.
\end{Section}
\begin{Section}{Methods}
\describe{
\item[Arith] \code{signature(e1 = "CsparseMatrix", e2 = "numeric")}: ... 
\item[Arith] \code{signature(e1 = "numeric", e2 = "CsparseMatrix")}: ... 
\item[Math] \code{signature(x = "CsparseMatrix")}: ... 

\item[band] \code{signature(x = "CsparseMatrix")}: ... 
\item[-] \code{signature(e1 = "CsparseMatrix", e2 = "numeric")}: ... 
\item[-] \code{signature(e1 = "numeric", e2 = "CsparseMatrix")}: ... 
\item[[\textless{}-] \code{signature(x = "CsparseMatrix", i = "index", j = "missing", value = "replValue")}: ... 
\item[[\textless{}-] \code{signature(x = "CsparseMatrix", i = "index", j = "index", value = "replValue")}: ... 
\item[[\textless{}-] \code{signature(x = "CsparseMatrix", i = "missing", j = "index", value = "replValue")}: ... 
\item[\%*\%] \code{signature(x = "CsparseMatrix", y = "CsparseMatrix")}: ... 
\item[\%*\%] \code{signature(x = "CsparseMatrix", y = "denseMatrix")}: ... 
\item[\%*\%] \code{signature(x = "CsparseMatrix", y = "matrix")}: ... 
\item[+] \code{signature(e1 = "CsparseMatrix", e2 = "numeric")}: ... 
\item[+] \code{signature(e1 = "numeric", e2 = "CsparseMatrix")}: ... 
\item[coerce] \code{signature(from = "CsparseMatrix", to = "TsparseMatrix")}: ... 
\item[coerce] \code{signature(from = "CsparseMatrix", to = "denseMatrix")}: ... 
\item[coerce] \code{signature(from = "CsparseMatrix", to = "matrix")}: ... 
\item[coerce] \code{signature(from = "CsparseMatrix", to = "lsparseMatrix")}: ... 
\item[coerce] \code{signature(from = "CsparseMatrix", to = "nsparseMatrix")}: ... 
\item[coerce] \code{signature(from = "TsparseMatrix", to = "CsparseMatrix")}: ... 
\item[coerce] \code{signature(from = "denseMatrix", to = "CsparseMatrix")}: ... 
\item[crossprod] \code{signature(x = "CsparseMatrix", y = "CsparseMatrix")}: ... 
\item[crossprod] \code{signature(x = "CsparseMatrix", y = "missing")}: ... 
\item[crossprod] \code{signature(x = "CsparseMatrix", y = "dgeMatrix")}: ... 
\item[crossprod] \code{signature(x = "CsparseMatrix", y = "matrix")}: ... 
\item[diag] \code{signature(x = "CsparseMatrix")}: ... 
\item[gamma] \code{signature(x = "CsparseMatrix")}: ... 
\item[lgamma] \code{signature(x = "CsparseMatrix")}: ... 
\item[log] \code{signature(x = "CsparseMatrix")}: ... 
\item[t] \code{signature(x = "CsparseMatrix")}: ... 
\item[tcrossprod] \code{signature(x = "CsparseMatrix", y = "CsparseMatrix")}: ... 
\item[tcrossprod] \code{signature(x = "CsparseMatrix", y = "missing")}: ... 
\item[tril] \code{signature(x = "CsparseMatrix")}: ... 
\item[triu] \code{signature(x = "CsparseMatrix")}: ... 
}
\end{Section}
\begin{Note}\relax
All classes extending \code{CsparseMatrix} have a common validity
(see \code{\LinkA{validObject}{validObject}}) check function.  That function
additionally checks the \code{i} slot for each column to contain
increasing row numbers. \\
In earlier versions of \pkg{Matrix} (\code{<= 0.999375-16}),
\code{\LinkA{validObject}{validObject}} automatically re-sorted the entries when
necessary, and hence \code{new()} calls with somewhat permuted
\code{i} and \code{x} slots worked, as \code{\LinkA{new}{new}(...)}
(\emph{with} slot arguments) automatically checks the validity.

Now, you have to use \code{\LinkA{sparseMatrix}{sparseMatrix}} to achieve the same
functionality or know how to use \code{.validateCsparse()} to do so.
\end{Note}
\begin{SeeAlso}\relax
\code{\LinkA{colSums}{colSums}}, \code{\LinkA{kronecker}{kronecker}}, and other such methods
with own help pages.

Further, the super class of \code{CsparseMatrix},
\code{\LinkA{sparseMatrix}{sparseMatrix.Rdash.class}}, and, e.g.,
class \code{\LinkA{dgCMatrix}{dgCMatrix.Rdash.class}} for the links to other classes.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
getClass("CsparseMatrix")

## The common validity check function (based on C code):
getValidity(getClass("CsparseMatrix"))

## This behavior has been changed
# un-sorted i-slot on input is automatically "sorted" :
#M <- new("dgCMatrix", Dim = 2:3, p = as.integer(c(0,1,1,3)),
#         i = c(1L, 1:0), x= c(2,2,1))
#stopifnot(M@i == c(1L, 0:1), M@x == c(2,1,2))
\end{ExampleCode}
\end{Examples}

