Enum tc_tensor::SparseAccessor
source · pub enum SparseAccessor<FD, FS, D, T> {
Show 14 variants
Broadcast(Box<SparseBroadcast<FD, FS, D, T, Self>>),
Cast(Box<SparseCast<FD, FS, D, T, Self>>),
Combine(Box<SparseCombinator<FD, FS, D, T, Self, Self>>),
CombineConst(Box<SparseConstCombinator<FD, FS, D, T, Self>>),
CombineLeft(Box<SparseLeftCombinator<FD, FS, D, T, Self, Self>>),
Dense(Box<DenseToSparse<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>>),
Expand(Box<SparseExpand<FD, FS, D, T, Self>>),
Flip(Box<SparseFlip<FD, FS, D, T, Self>>),
Slice(SparseTableSlice<FD, FS, D, T>),
Reduce(Box<SparseReduce<FD, FS, D, T>>),
Reshape(Box<SparseReshape<FD, FS, D, T, Self>>),
Table(SparseTable<FD, FS, D, T>),
Transpose(Box<SparseTranspose<FD, FS, D, T, Self>>),
Unary(Box<SparseUnary<FD, FS, D, T>>),
}
Expand description
A generic SparseAccess
type
Variants§
Broadcast(Box<SparseBroadcast<FD, FS, D, T, Self>>)
Cast(Box<SparseCast<FD, FS, D, T, Self>>)
Combine(Box<SparseCombinator<FD, FS, D, T, Self, Self>>)
CombineConst(Box<SparseConstCombinator<FD, FS, D, T, Self>>)
CombineLeft(Box<SparseLeftCombinator<FD, FS, D, T, Self, Self>>)
Dense(Box<DenseToSparse<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>>)
Expand(Box<SparseExpand<FD, FS, D, T, Self>>)
Flip(Box<SparseFlip<FD, FS, D, T, Self>>)
Slice(SparseTableSlice<FD, FS, D, T>)
Reduce(Box<SparseReduce<FD, FS, D, T>>)
Reshape(Box<SparseReshape<FD, FS, D, T, Self>>)
Table(SparseTable<FD, FS, D, T>)
Transpose(Box<SparseTranspose<FD, FS, D, T, Self>>)
Unary(Box<SparseUnary<FD, FS, D, T>>)
Trait Implementations§
source§impl<FD: Clone, FS: Clone, D: Clone, T: Clone> Clone for SparseAccessor<FD, FS, D, T>
impl<FD: Clone, FS: Clone, D: Clone, T: Clone> Clone for SparseAccessor<FD, FS, D, T>
source§fn clone(&self) -> SparseAccessor<FD, FS, D, T>
fn clone(&self) -> SparseAccessor<FD, FS, D, T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<FD, FS, D, T> Display for SparseAccessor<FD, FS, D, T>
impl<FD, FS, D, T> Display for SparseAccessor<FD, FS, D, T>
source§impl<FD, FS, D, T> SparseAccess<FD, FS, D, T> for SparseAccessor<FD, FS, D, T>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T> SparseAccess<FD, FS, D, T> for SparseAccessor<FD, FS, D, T>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
D::Write: DirCreateFile<FD>,
§type Slice = SparseAccessor<FD, FS, D, T>
type Slice = SparseAccessor<FD, FS, D, T>
The type of a slice of this accessor
source§fn accessor(self) -> SparseAccessor<FD, FS, D, T>
fn accessor(self) -> SparseAccessor<FD, FS, D, T>
Return this accessor as a
SparseAccessor
.source§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<'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,
source§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_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,
source§fn filled_count<'async_trait>(
self,
txn: T
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
fn filled_count<'async_trait>(
self,
txn: T
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
Return the number of nonzero values in this
SparseTensor
.source§fn is_empty<'async_trait>(
self,
txn: T
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + 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,
Return
true
if this SparseTensor
contains no elements.source§impl<FD, FS, D, T> SparseWrite for SparseAccessor<FD, FS, D, T>where
FD: Send + Sync,
FS: Send + Sync,
D: Send + Sync,
T: Send + Sync,
SparseTable<FD, FS, D, T>: SparseWrite,
impl<FD, FS, D, T> SparseWrite for SparseAccessor<FD, FS, D, T>where
FD: Send + Sync,
FS: Send + Sync,
D: Send + Sync,
T: Send + Sync,
SparseTable<FD, FS, D, T>: SparseWrite,
source§impl<FD, FS, D, T> TensorAccess for SparseAccessor<FD, FS, D, T>
impl<FD, FS, D, T> TensorAccess for SparseAccessor<FD, FS, D, T>
Auto Trait Implementations§
impl<FD, FS, D, T> !RefUnwindSafe for SparseAccessor<FD, FS, D, T>
impl<FD, FS, D, T> Send for SparseAccessor<FD, FS, D, T>where
D: Send + Sync,
FD: Send,
FS: Send + Sync,
T: Send + Sync,
impl<FD, FS, D, T> Sync for SparseAccessor<FD, FS, D, T>where
D: Send + Sync,
FD: Sync,
FS: Send + Sync,
T: Send + Sync,
impl<FD, FS, D, T> Unpin for SparseAccessor<FD, FS, D, T>where
FD: Unpin,
impl<FD, FS, D, T> !UnwindSafe for SparseAccessor<FD, FS, D, T>
Blanket Implementations§
source§impl<F> Match for F
impl<F> Match for F
source§fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
Returns
true
if self
can be cast into the target type T
.source§impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
source§fn can_cast_from(_: &F) -> bool
fn can_cast_from(_: &F) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
source§fn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if
self
can be cast into T
.source§fn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns
Some(T)
if self
can be cast into T
, otherwise None
.