lsparseMatrix-classes: Sparse logical matrices
Description
The lsparseMatrix
class is a virtual class of sparse
matrices with TRUE
/FALSE
entries. Only the positions of the
elements that are TRUE
are stored. These can be stored in the
``triplet'' form (classes lgTMatrix
, lsTMatrix
, and
ltTMatrix
which really contain pairs, not triplets) or in
compressed column-oriented form (classes lgCMatrix
, lsCMatrix
, and
ltCMatrix
) or in compressed row-oriented form (classes lgRMatrix
, lsRMatrix
, and
ltRMatrix
). The second
letter in the name of these non-virtual classes indicates
g
eneral, s
ymmetric, or t
riangular.Objects from the Class
Objects can be created by calls of the form new("lgCMatrix",
...)
and so on. More frequently objects are created by coercion of
a numeric sparse matrix to the logical form for use in
the symbolic analysis phase
of an algorithm involving sparse matrices. Such algorithms often
involve two phases: a symbolic phase wherein the positions of the
non-zeros in the result are determined and a numeric phase wherein the
actual results are calculated. During the symbolic phase only the
positions of the non-zero elements in any operands are of interest,
hence any numeric sparse matrices can be treated as logical sparse
matrices.