Skip to main content

sparse_vector/
element.rs

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