sparse-vector-rs 3.0.0

A sparse vector: a mapping from integer index to arbitrary value that stores only the positions differing from a default value.
Documentation
1
2
3
4
5
6
7
8
9
/// A single stored position: the serialization shape, so a round trip has to carry the
/// default value alongside.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct Element<T = f64> {
    /// The position.
    pub index: i64,
    /// The value stored there.
    pub value: T,
}