pub struct Sparse {
pub axes: Vec<usize>,
pub indices: Vec<usize>,
pub fill: Data,
pub entries: usize,
}Expand description
What a sparse array holds besides its shape and its stored cells.
Fields§
§axes: Vec<usize>The axes stored sparsely, ascending and distinct. Every other axis of the shape is dense and forms the stored cell.
indices: Vec<usize>One row per stored entry, axes.len() columns, row-major: entry
e’s position along sparse axis axes[j] is indices[e * k + j].
fill: DataThe element every position not named by indices holds. Exactly one
element, of the array’s own dtype.
entries: usizeStored entries. It is not derivable from the buffers when there are no sparse axes at all, or when a dense axis has length zero.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Sparse
Auto Trait Implementations§
impl !RefUnwindSafe for Sparse
impl !UnwindSafe for Sparse
impl Freeze for Sparse
impl Send for Sparse
impl Sync for Sparse
impl Unpin for Sparse
impl UnsafeUnpin for Sparse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more