Crate sparsevec[][src]


A SparseVec efficiently encodes a two-dimensional matrix of integers. The input matrix must be encoded as a one-dimensional vector of integers with a row-length. Given an “empty” value, the SparseVec uses row displacement to compress that value as described in “Storing a sparse table” by Robert Endre Tarjan and Andrew Chi-Chih Yao. Afterwards it encodes the result further using a PackedVec.