pub trait SparseAccess<FD, FS, D, T>: ReadValueAt<D, Txn = T> + TensorAccess + Clone + Display + Send + Sync + 'staticwhere
    D: Dir,
    T: Transaction<D>,
{ type Slice: SparseAccess<FD, FS, D, T>; fn accessor(self) -> SparseAccessor<FD, FS, D, T>; fn filled<'a, 'async_trait>(
        self,
        txn: T
    ) -> Pin<Box<dyn Future<Output = TCResult<Pin<Box<dyn Stream<Item = TCResult<(Coord, Number)>> + Send + Unpin + 'a>>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'a: 'async_trait
; fn filled_at<'a, 'async_trait>(
        self,
        txn: T,
        axes: Vec<usize>
    ) -> Pin<Box<dyn Future<Output = TCResult<TCBoxTryStream<'a, Coords>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'a: 'async_trait
; fn filled_count<'async_trait>(
        self,
        txn: T
    ) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>>
    where
        Self: 'async_trait
; fn is_empty<'async_trait>(
        self,
        txn: T
    ) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>
    where
        Self: 'async_trait
; fn slice(self, bounds: Bounds) -> TCResult<Self::Slice>; fn transpose(
        self,
        permutation: Option<Vec<usize>>
    ) -> TCResult<SparseAccessor<FD, FS, D, T>>; }
Expand description

Access methods for SparseTensor data

Required Associated Types§

The type of a slice of this accessor

Required Methods§

Return this accessor as a SparseAccessor.

Return this SparseTensor’s contents as an ordered stream of (Coord, [Number]) pairs.

Return an ordered stream of unique Coords on the given axes with nonzero values.

Note: is it not safe to assume that all returned coordinates are filled, but it is safe to assume that all coordinates not returned are not filled.

TODO: add sort parameter to make sorting results optional.

Return the number of nonzero values in this SparseTensor.

Return true if this SparseTensor contains no elements.

Return a slice of this accessor with the given Bounds.

Return this accessor as transposed according to the given permutation.

If no permutation is given, this accessor’s axes will be reversed.

Implementors§