pub struct SparseMatrixIndexCsx {
pub compressed_axis: SparseMatrixCompressedAxis,
pub indptr_type: Box<Int>,
pub indptr_buffer: Buffer,
pub indices_type: Box<Int>,
pub indices_buffer: Buffer,
}Expand description
Compressed Sparse format, that is matrix-specific.
Generated from these locations:
- Table
SparseMatrixIndexCSXin the fileSparseTensor.fbs:80
Fields§
§compressed_axis: SparseMatrixCompressedAxisWhich axis, row or column, is compressed
indptr_type: Box<Int>The type of values in indptrBuffer
indptr_buffer: BufferindptrBuffer stores the location and size of indptr array that
represents the range of the rows.
The i-th row spans from indptr[i] to indptr[i+1] in the data.
The length of this array is 1 + (the number of rows), and the type
of index value is long.
For example, let X be the following 6x4 matrix:
X := [[0, 1, 2, 0],
[0, 0, 3, 0],
[0, 4, 0, 5],
[0, 0, 0, 0],
[6, 0, 7, 8],
[0, 9, 0, 0]].The array of non-zero values in X is:
values(X) = [1, 2, 3, 4, 5, 6, 7, 8, 9].And the indptr of X is:
indptr(X) = [0, 2, 3, 5, 5, 8, 10].indices_type: Box<Int>The type of values in indicesBuffer
indices_buffer: BufferindicesBuffer stores the location and size of the array that contains the column indices of the corresponding non-zero values. The type of index value is long.
For example, the indices of the above X is:
indices(X) = [1, 2, 2, 1, 3, 0, 2, 3, 1].Note that the indices are sorted in lexicographical order for each row.
Implementations§
Source§impl SparseMatrixIndexCsx
impl SparseMatrixIndexCsx
Sourcepub fn builder() -> SparseMatrixIndexCsxBuilder<()>
pub fn builder() -> SparseMatrixIndexCsxBuilder<()>
Creates a SparseMatrixIndexCsxBuilder for serializing an instance of this table.
pub fn create( builder: &mut Builder, field_compressed_axis: impl WriteAsDefault<SparseMatrixCompressedAxis, SparseMatrixCompressedAxis>, field_indptr_type: impl WriteAs<Offset<Int>>, field_indptr_buffer: impl WriteAs<Buffer>, field_indices_type: impl WriteAs<Offset<Int>>, field_indices_buffer: impl WriteAs<Buffer>, ) -> Offset<Self>
Trait Implementations§
Source§impl Clone for SparseMatrixIndexCsx
impl Clone for SparseMatrixIndexCsx
Source§fn clone(&self) -> SparseMatrixIndexCsx
fn clone(&self) -> SparseMatrixIndexCsx
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SparseMatrixIndexCsx
impl Debug for SparseMatrixIndexCsx
Source§impl Default for SparseMatrixIndexCsx
impl Default for SparseMatrixIndexCsx
Source§impl<'de> Deserialize<'de> for SparseMatrixIndexCsx
impl<'de> Deserialize<'de> for SparseMatrixIndexCsx
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for SparseMatrixIndexCsx
impl Hash for SparseMatrixIndexCsx
Source§impl Ord for SparseMatrixIndexCsx
impl Ord for SparseMatrixIndexCsx
Source§fn cmp(&self, other: &SparseMatrixIndexCsx) -> Ordering
fn cmp(&self, other: &SparseMatrixIndexCsx) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SparseMatrixIndexCsx
impl PartialEq for SparseMatrixIndexCsx
Source§impl PartialOrd for SparseMatrixIndexCsx
impl PartialOrd for SparseMatrixIndexCsx
Source§impl Serialize for SparseMatrixIndexCsx
impl Serialize for SparseMatrixIndexCsx
Source§impl<'a> TryFrom<SparseMatrixIndexCsxRef<'a>> for SparseMatrixIndexCsx
impl<'a> TryFrom<SparseMatrixIndexCsxRef<'a>> for SparseMatrixIndexCsx
impl Eq for SparseMatrixIndexCsx
impl StructuralPartialEq for SparseMatrixIndexCsx
impl VectorWrite<Offset<SparseMatrixIndexCsx>> for SparseMatrixIndexCsx
§Safety
The planus compiler generates implementations that initialize
the bytes in write_values.
impl WriteAs<Offset<SparseMatrixIndexCsx>> for SparseMatrixIndexCsx
impl WriteAsOffset<SparseMatrixIndexCsx> for SparseMatrixIndexCsx
impl<T0: WriteAsDefault<SparseMatrixCompressedAxis, SparseMatrixCompressedAxis>, T1: WriteAs<Offset<Int>>, T2: WriteAs<Buffer>, T3: WriteAs<Offset<Int>>, T4: WriteAs<Buffer>> WriteAsOffset<SparseMatrixIndexCsx> for SparseMatrixIndexCsxBuilder<(T0, T1, T2, T3, T4)>
impl WriteAsOptional<Offset<SparseMatrixIndexCsx>> for SparseMatrixIndexCsx
Auto Trait Implementations§
impl Freeze for SparseMatrixIndexCsx
impl RefUnwindSafe for SparseMatrixIndexCsx
impl Send for SparseMatrixIndexCsx
impl Sync for SparseMatrixIndexCsx
impl Unpin for SparseMatrixIndexCsx
impl UnwindSafe for SparseMatrixIndexCsx
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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