\HeaderA{sparseVector-class}{Sparse Vector Classes}{sparseVector.Rdash.class}
\aliasA{-,dsparseVector,missing-method}{sparseVector-class}{.Rdash.,dsparseVector,missing.Rdash.method}
\aliasA{Arith,dsparseVector,dsparseVector-method}{sparseVector-class}{Arith,dsparseVector,dsparseVector.Rdash.method}
\aliasA{Arith,sparseVector,sparseVector-method}{sparseVector-class}{Arith,sparseVector,sparseVector.Rdash.method}
\aliasA{as.numeric,sparseVector-method}{sparseVector-class}{as.numeric,sparseVector.Rdash.method}
\aliasA{as.vector,sparseVector,character-method}{sparseVector-class}{as.vector,sparseVector,character.Rdash.method}
\aliasA{as.vector,sparseVector,missing-method}{sparseVector-class}{as.vector,sparseVector,missing.Rdash.method}
\aliasA{coerce,ANY,sparseVector-method}{sparseVector-class}{coerce,ANY,sparseVector.Rdash.method}
\aliasA{coerce,atomicVector,dsparseVector-method}{sparseVector-class}{coerce,atomicVector,dsparseVector.Rdash.method}
\aliasA{coerce,atomicVector,sparseVector-method}{sparseVector-class}{coerce,atomicVector,sparseVector.Rdash.method}
\aliasA{coerce,diagonalMatrix,sparseVector-method}{sparseVector-class}{coerce,diagonalMatrix,sparseVector.Rdash.method}
\aliasA{coerce,sparseMatrix,sparseVector-method}{sparseVector-class}{coerce,sparseMatrix,sparseVector.Rdash.method}
\aliasA{coerce,sparseVector,vector-method}{sparseVector-class}{coerce,sparseVector,vector.Rdash.method}
\aliasA{coerce,triangularVector,sparseVector-method}{sparseVector-class}{coerce,triangularVector,sparseVector.Rdash.method}
\aliasA{coerce,TsparseMatrix,sparseVector-method}{sparseVector-class}{coerce,TsparseMatrix,sparseVector.Rdash.method}
\aliasA{coerce,xsparseVector,dsparseVector-method}{sparseVector-class}{coerce,xsparseVector,dsparseVector.Rdash.method}
\aliasA{coerce,xsparseVector,isparseVector-method}{sparseVector-class}{coerce,xsparseVector,isparseVector.Rdash.method}
\aliasA{coerce,xsparseVector,lsparseVector-method}{sparseVector-class}{coerce,xsparseVector,lsparseVector.Rdash.method}
\aliasA{coerce,xsparseVector,nsparseVector-method}{sparseVector-class}{coerce,xsparseVector,nsparseVector.Rdash.method}
\aliasA{coerce,xsparseVector,zsparseVector-method}{sparseVector-class}{coerce,xsparseVector,zsparseVector.Rdash.method}
\aliasA{crossprod,Matrix,sparseVector-method}{sparseVector-class}{crossprod,Matrix,sparseVector.Rdash.method}
\aliasA{crossprod,sparseVector,Matrix-method}{sparseVector-class}{crossprod,sparseVector,Matrix.Rdash.method}
\aliasA{dim<-,sparseVector-method}{sparseVector-class}{dim<.Rdash.,sparseVector.Rdash.method}
\aliasA{dsparseVector-class}{sparseVector-class}{dsparseVector.Rdash.class}
\aliasA{isparseVector-class}{sparseVector-class}{isparseVector.Rdash.class}
\aliasA{length,sparseVector-method}{sparseVector-class}{length,sparseVector.Rdash.method}
\aliasA{Logic,lsparseVector,lsparseVector-method}{sparseVector-class}{Logic,lsparseVector,lsparseVector.Rdash.method}
\aliasA{Logic,sparseVector,sparseVector-method}{sparseVector-class}{Logic,sparseVector,sparseVector.Rdash.method}
\aliasA{lsparseVector-class}{sparseVector-class}{lsparseVector.Rdash.class}
\aliasA{nsparseVector-class}{sparseVector-class}{nsparseVector.Rdash.class}
\aliasA{Ops,ANY,sparseVector-method}{sparseVector-class}{Ops,ANY,sparseVector.Rdash.method}
\aliasA{Ops,atomicVector,sparseVector-method}{sparseVector-class}{Ops,atomicVector,sparseVector.Rdash.method}
\aliasA{Ops,sparseVector,ANY-method}{sparseVector-class}{Ops,sparseVector,ANY.Rdash.method}
\aliasA{Ops,sparseVector,atomicVector-method}{sparseVector-class}{Ops,sparseVector,atomicVector.Rdash.method}
\aliasA{rep,sparseVector-method}{sparseVector-class}{rep,sparseVector.Rdash.method}
\aliasA{show,sparseVector-method}{sparseVector-class}{show,sparseVector.Rdash.method}
\aliasA{solve,Matrix,sparseVector-method}{sparseVector-class}{solve,Matrix,sparseVector.Rdash.method}
\aliasA{tcrossprod,Matrix,sparseVector-method}{sparseVector-class}{tcrossprod,Matrix,sparseVector.Rdash.method}
\aliasA{tcrossprod,sparseVector,Matrix-method}{sparseVector-class}{tcrossprod,sparseVector,Matrix.Rdash.method}
\aliasA{xsparseVector-class}{sparseVector-class}{xsparseVector.Rdash.class}
\aliasA{zsparseVector-class}{sparseVector-class}{zsparseVector.Rdash.class}
\aliasA{[,sparseVector,index,ANY,ANY-method}{sparseVector-class}{[,sparseVector,index,ANY,ANY.Rdash.method}
\aliasA{[<-,sparseVector,index,missing,replValue-method}{sparseVector-class}{[<.Rdash.,sparseVector,index,missing,replValue.Rdash.method}
\aliasA{\%*\%,Matrix,sparseVector-method}{sparseVector-class}{.Rpcent.*.Rpcent.,Matrix,sparseVector.Rdash.method}
\aliasA{\%*\%,sparseVector,Matrix-method}{sparseVector-class}{.Rpcent.*.Rpcent.,sparseVector,Matrix.Rdash.method}
\keyword{classes}{sparseVector-class}
\begin{Description}\relax
Sparse Vector Classes: The virtual mother class
\code{"sparseVector"} has the five actual daughter classes
\code{"dsparseVector"}, \code{"isparseVector"},
\code{"lsparseVector"}, \code{"nsparseVector"}, and
\code{"zsparseVector"}, where we've mainly implemented methods for
the \code{d*}, \code{l*} and \code{n*} ones.
\end{Description}
\begin{Section}{Slots}
\describe{
\item[\code{length}:] class \code{"integer"} - the \code{\LinkA{length}{length}}
of the sparse vector.
\item[\code{i}:] class \code{"integer"} - the (1-based) indices of
the non-zero entries.
\item[\code{x}:] (for all but \code{"nsparseVector"}):
the non-zero entries.  This is of class \code{"numeric"} for class
\code{"dsparseVector"},  \code{"logical"} for class
\code{"lsparseVector"}, etc.

Note that \code{"nsparseVector"}s have no \code{x} slot.
Further, mainly for ease of method definitions, we've defined the
class union (see \code{\LinkA{setClassUnion}{setClassUnion}}) of all sparse vector
classes which \emph{have} an \code{x} slot, as class \code{"xsparseVector"}.

}
\end{Section}
\begin{Section}{Methods}
\describe{
\item[length] \code{signature(x = "sparseVector")}: simply extracts
the \code{length} slot.
\item[show] \code{signature(object = "sparseVector")}: The
\code{\LinkA{show}{show}} method for sparse vectors prints
\emph{\dQuote{structural}} zeroes as \code{"."} using the
non-exported \code{prSpVector} function which allows further
customization such as replacing \code{"."} by \code{" "} (blank).

Note that \code{\LinkA{options}{options}(max.print)} will influence how many
entries of large sparse vectors are printed at all.
\item[as.vector] \code{signature(x = "sparseVector", mode = "character")}
coerces sparse vectors to \dQuote{regular}, i.e., atomic vectors.
This is the same as \code{as(x, "vector")}.
\item[dim\textless{}-] \code{signature(x = "sparseVector", value = "integer")}
coerces a sparse vector to a sparse Matrix, i.e., an object
inheriting from \code{\LinkA{sparseMatrix}{sparseMatrix.Rdash.class}}, of the
appropriate dimension.
\item[rep] \code{signature(x = "sparseVector")} repeat \code{x},
with the same argument list \code{(x, times, length.out, each,
      ...)} as the default method for rep().
}
\end{Section}
\begin{Examples}
\begin{ExampleCode}
getClass("sparseVector")
getClass("dsparseVector")
getClass("xsparseVector")# those with an 'x' slot

sx <- c(0,0,3, 3.2, 0,0,0,-3:1,0,0,2,0,0,5,0,0)
(ss <- as(sx, "sparseVector"))

ix <- as.integer(round(sx))
(is <- as(ix, "sparseVector"))
## an "isparseVector" (!)

## rep() works too:
rep(is, length.out= 25)

## Using `dim<-`  as in base R :
r <- ss
dim(r) <- c(4,5) # becomes a sparse Matrix:
r

\end{ExampleCode}
\end{Examples}

