Struct tc_tensor::SparseTable
source · [−]pub struct SparseTable<FD, FS, D, T> { /* private fields */ }
Expand description
The base accessor type of SparseTensor
, implementing SparseAccess
for a TableIndex
.
Implementations
Trait Implementations
impl<FD, FS, D, T, A> CopyFrom<D, SparseTensor<FD, FS, D, T, A>> for SparseTable<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
A: SparseAccess<FD, FS, D, T>,
D::FileClass: From<BTreeType> + From<TensorType>,
impl<FD, FS, D, T, A> CopyFrom<D, SparseTensor<FD, FS, D, T, A>> for SparseTable<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
A: SparseAccess<FD, FS, D, T>,
D::FileClass: From<BTreeType> + From<TensorType>,
impl<FD, FS, D, T> FromStream for SparseTable<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<BTreeType> + From<TensorType>,
impl<FD, FS, D, T> FromStream for SparseTable<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<BTreeType> + From<TensorType>,
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
impl<FD, FS, D, T> SparseAccess<FD, FS, D, T> for SparseTable<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T> SparseAccess<FD, FS, D, T> for SparseTable<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
type Slice = SparseAccessor<FD, FS, D, T>
type Slice = SparseAccessor<FD, FS, D, T>
The type of a slice of this accessor
type Transpose = SparseTranspose<FD, FS, D, T, Self>
type Transpose = SparseTranspose<FD, FS, D, T, Self>
The type of a transpose of this accessor
Return this accessor as a SparseAccessor
.
Return this SparseTensor
’s contents as an ordered stream of (Coord
, [Number
]) pairs.
Return the number of nonzero values in this SparseTensor
.
Return a slice of this accessor with the given Bounds
.
impl<FD, FS, D, T> SparseWrite<FD, FS, D, T> for SparseTable<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
Self: SparseAccess<FD, FS, D, T>,
impl<FD, FS, D, T> SparseWrite<FD, FS, D, T> for SparseTable<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
Self: SparseAccess<FD, FS, D, T>,
impl<FD, FS, D, T> Transact for SparseTable<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
TableIndex<FS, D, T>: Transact,
impl<FD, FS, D, T> Transact for SparseTable<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
TableIndex<FS, D, T>: Transact,
Commit this transaction.
Auto Trait Implementations
impl<FD, FS, D, T> RefUnwindSafe for SparseTable<FD, FS, D, T> where
D: RefUnwindSafe,
FD: RefUnwindSafe,
FS: RefUnwindSafe,
T: RefUnwindSafe,
impl<FD, FS, D, T> Send for SparseTable<FD, FS, D, T> where
D: Send + Sync,
FD: Send,
FS: Send + Sync,
T: Send + Sync,
impl<FD, FS, D, T> Sync for SparseTable<FD, FS, D, T> where
D: Send + Sync,
FD: Sync,
FS: Send + Sync,
T: Send + Sync,
impl<FD, FS, D, T> Unpin for SparseTable<FD, FS, D, T> where
FD: Unpin,
impl<FD, FS, D, T> UnwindSafe for SparseTable<FD, FS, D, T> where
D: RefUnwindSafe,
FD: UnwindSafe,
FS: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns true
if self
can be cast into the target type T
.
Test if value
can be cast into Self
.
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
Test if self
can be cast into T
.
Returns Some(T)
if self
can be cast into T
, otherwise None
.
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.