pub enum Tensor<FD, FS, D, T> {
Dense(DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>),
Sparse(SparseTensor<FD, FS, D, T, SparseAccessor<FD, FS, D, T>>),
}
Expand description
An n-dimensional array of numbers which supports basic math and logic operations
Variants
Dense(DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>)
Sparse(SparseTensor<FD, FS, D, T, SparseAccessor<FD, FS, D, T>>)
Implementations
Trait Implementations
sourceimpl<FD, FS, D, T> Debug for Tensor<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T> Debug for Tensor<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
sourceimpl<FD, FS, D, T> Display for Tensor<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T> Display for Tensor<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
sourceimpl<FD, FS, D, T, B> From<DenseTensor<FD, FS, D, T, B>> for Tensor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> From<DenseTensor<FD, FS, D, T, B>> for Tensor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
sourcefn from(dense: DenseTensor<FD, FS, D, T, B>) -> Self
fn from(dense: DenseTensor<FD, FS, D, T, B>) -> Self
Converts to this type from the input type.
sourceimpl<FD, FS, D, T, A> From<SparseTensor<FD, FS, D, T, A>> for Tensor<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<TensorType>,
impl<FD, FS, D, T, A> From<SparseTensor<FD, FS, D, T, A>> for Tensor<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<TensorType>,
sourcefn from(sparse: SparseTensor<FD, FS, D, T, A>) -> Self
fn from(sparse: SparseTensor<FD, FS, D, T, A>) -> Self
Converts to this type from the input type.
sourceimpl<FD, FS, D, T> FromStream for Tensor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
T: Transaction<D>,
D::FileClass: From<BTreeType> + From<TensorType>,
impl<FD, FS, D, T> FromStream for Tensor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
T: Transaction<D>,
D::FileClass: From<BTreeType> + From<TensorType>,
type Context = T
type Context = T
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
sourcefn from_stream<'life0, 'async_trait, De>(
txn: T,
decoder: &'life0 mut De
) -> Pin<Box<dyn Future<Output = Result<Self, De::Error>> + Send + 'async_trait>> where
De: 'async_trait + Decoder,
'life0: 'async_trait,
Self: 'async_trait,
fn from_stream<'life0, 'async_trait, De>(
txn: T,
decoder: &'life0 mut De
) -> Pin<Box<dyn Future<Output = Result<Self, De::Error>> + Send + 'async_trait>> where
De: 'async_trait + Decoder,
'life0: 'async_trait,
Self: 'async_trait,
Parse this value using the given Decoder
.
sourceimpl<FD: File<Array>, FS: File<Node>, D: Dir, T: Transaction<D>> Instance for Tensor<FD, FS, D, T>
impl<FD: File<Array>, FS: File<Node>, D: Dir, T: Transaction<D>> Instance for Tensor<FD, FS, D, T>
sourceimpl<'en, FD, FS, D, T> IntoView<'en, D> for Tensor<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<'en, FD, FS, D, T> IntoView<'en, D> for Tensor<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>,
sourceimpl<FD, FS, D, T> TensorAccess for Tensor<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> TensorAccess for Tensor<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>,
sourceimpl<FD, FS, D, T, B> TensorBoolean<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorBoolean<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type LeftCombine = Tensor<FD, FS, D, T>
type LeftCombine = Tensor<FD, FS, D, T>
The result type of a boolean operation which may ignore right-hand values.
sourceimpl<FD, FS, D, T, A> TensorBoolean<Tensor<FD, FS, D, T>> for SparseTensor<FD, FS, D, T, A> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
A: SparseAccess<FD, FS, D, T>,
impl<FD, FS, D, T, A> TensorBoolean<Tensor<FD, FS, D, T>> for SparseTensor<FD, FS, D, T, A> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
A: SparseAccess<FD, FS, D, T>,
type LeftCombine = Tensor<FD, FS, D, T>
type LeftCombine = Tensor<FD, FS, D, T>
The result type of a boolean operation which may ignore right-hand values.
sourceimpl<FD, FS, D, T> TensorBoolean<Tensor<FD, FS, D, T>> for Tensor<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> TensorBoolean<Tensor<FD, FS, D, T>> for Tensor<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 LeftCombine = Tensor<FD, FS, D, T>
type LeftCombine = Tensor<FD, FS, D, T>
The result type of a boolean operation which may ignore right-hand values.
sourcefn and(self, other: Self) -> TCResult<Self::LeftCombine>
fn and(self, other: Self) -> TCResult<Self::LeftCombine>
Logical and
sourceimpl<FD, FS, D, T> TensorBooleanConst for Tensor<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> TensorBooleanConst for Tensor<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 DenseCombine = Tensor<FD, FS, D, T>
type DenseCombine = Tensor<FD, FS, D, T>
The return type of a boolean operation with a result expected to be dense.
sourceimpl<FD, FS, D, T, B> TensorCompare<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorCompare<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
sourceimpl<FD, FS, D, T, A> TensorCompare<Tensor<FD, FS, D, T>> for SparseTensor<FD, FS, D, T, A> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
A: SparseAccess<FD, FS, D, T>,
impl<FD, FS, D, T, A> TensorCompare<Tensor<FD, FS, D, T>> for SparseTensor<FD, FS, D, T, A> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
A: SparseAccess<FD, FS, D, T>,
sourceimpl<FD, FS, D, T> TensorCompare<Tensor<FD, FS, D, T>> for Tensor<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> TensorCompare<Tensor<FD, FS, D, T>> for Tensor<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>,
sourceimpl<FD, FS, D, T> TensorCompareConst for Tensor<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> TensorCompareConst for Tensor<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>,
sourceimpl<FD, FS, D, T> TensorDiagonal<D> for Tensor<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>,
SparseTable<FD, FS, D, T>: ReadValueAt<D, Txn = T>,
impl<FD, FS, D, T> TensorDiagonal<D> for Tensor<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>,
SparseTable<FD, FS, D, T>: ReadValueAt<D, Txn = T>,
sourceimpl<FD, FS, D, T, B> TensorDualIO<D, Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorDualIO<D, Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Txn = T
type Txn = T
The type of Transaction
to expect
sourceimpl<FD, FS, D, T, A> TensorDualIO<D, Tensor<FD, FS, D, T>> for SparseTensor<FD, FS, D, T, A> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<BTreeType> + From<TensorType>,
A: SparseWrite<FD, FS, D, T>,
impl<FD, FS, D, T, A> TensorDualIO<D, Tensor<FD, FS, D, T>> for SparseTensor<FD, FS, D, T, A> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<BTreeType> + From<TensorType>,
A: SparseWrite<FD, FS, D, T>,
type Txn = T
type Txn = T
The type of Transaction
to expect
sourceimpl<FD, FS, D, T> TensorDualIO<D, Tensor<FD, FS, D, T>> for Tensor<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> TensorDualIO<D, Tensor<FD, FS, D, T>> for Tensor<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>,
type Txn = T
type Txn = T
The type of Transaction
to expect
sourceimpl<FD, FS, D, T> TensorIO<D> for Tensor<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> TensorIO<D> for Tensor<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 Txn = T
type Txn = T
The type of Transaction
to expect
sourcefn read_value<'async_trait>(
self,
txn: Self::Txn,
coord: Coord
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>> where
Self: 'async_trait,
fn read_value<'async_trait>(
self,
txn: Self::Txn,
coord: Coord
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>> where
Self: 'async_trait,
Read a single value from this Tensor
.
sourceimpl<FD, FS, D, T> TensorIndex<D> for Tensor<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<BTreeType> + From<TensorType>,
impl<FD, FS, D, T> TensorIndex<D> for Tensor<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<BTreeType> + From<TensorType>,
sourceimpl<FD, FS, D, T> TensorInstance for Tensor<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> TensorInstance for Tensor<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>,
sourcefn into_dense(self) -> Self
fn into_dense(self) -> Self
Return a dense representation of this Tensor
.
sourcefn into_sparse(self) -> Self
fn into_sparse(self) -> Self
Return a sparse representation of this Tensor
.
sourceimpl<FD, FS, D, T, B> TensorMath<D, Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorMath<D, Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type LeftCombine = Tensor<FD, FS, D, T>
type LeftCombine = Tensor<FD, FS, D, T>
The result type of a math operation which may ignore right-hand-side values
sourcefn log(self, base: Tensor<FD, FS, D, T>) -> TCResult<Self::LeftCombine>
fn log(self, base: Tensor<FD, FS, D, T>) -> TCResult<Self::LeftCombine>
Element-wise logarithm of self
with respect to the given base
.
sourcefn mul(self, other: Tensor<FD, FS, D, T>) -> TCResult<Self::Combine>
fn mul(self, other: Tensor<FD, FS, D, T>) -> TCResult<Self::Combine>
Multiply two tensors together.
sourceimpl<FD, FS, D, T, A> TensorMath<D, Tensor<FD, FS, D, T>> for SparseTensor<FD, FS, D, T, A> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
A: SparseAccess<FD, FS, D, T>,
impl<FD, FS, D, T, A> TensorMath<D, Tensor<FD, FS, D, T>> for SparseTensor<FD, FS, D, T, A> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
A: SparseAccess<FD, FS, D, T>,
type LeftCombine = Tensor<FD, FS, D, T>
type LeftCombine = Tensor<FD, FS, D, T>
The result type of a math operation which may ignore right-hand-side values
sourcefn log(self, base: Tensor<FD, FS, D, T>) -> TCResult<Self::LeftCombine>
fn log(self, base: Tensor<FD, FS, D, T>) -> TCResult<Self::LeftCombine>
Element-wise logarithm of self
with respect to the given base
.
sourcefn mul(self, other: Tensor<FD, FS, D, T>) -> TCResult<Self::Combine>
fn mul(self, other: Tensor<FD, FS, D, T>) -> TCResult<Self::Combine>
Multiply two tensors together.
sourceimpl<FD, FS, D, T> TensorMath<D, Tensor<FD, FS, D, T>> for Tensor<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> TensorMath<D, Tensor<FD, FS, D, T>> for Tensor<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 LeftCombine = Tensor<FD, FS, D, T>
type LeftCombine = Tensor<FD, FS, D, T>
The result type of a math operation which may ignore right-hand-side values
sourcefn div(self, other: Self) -> TCResult<Self::LeftCombine>
fn div(self, other: Self) -> TCResult<Self::LeftCombine>
Divide self
by other
.
sourcefn log(self, base: Self) -> TCResult<Self::LeftCombine>
fn log(self, base: Self) -> TCResult<Self::LeftCombine>
Element-wise logarithm of self
with respect to the given base
.
sourcefn mul(self, other: Self) -> TCResult<Self::LeftCombine>
fn mul(self, other: Self) -> TCResult<Self::LeftCombine>
Multiply two tensors together.
sourceimpl<FD, FS, D, T> TensorMathConst for Tensor<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> TensorMathConst for Tensor<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 DenseCombine = Tensor<FD, FS, D, T>
type DenseCombine = Tensor<FD, FS, D, T>
The return type of a math operation with a result expected to be dense
sourceimpl<FD, FS, D, T> TensorReduce<D> for Tensor<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> TensorReduce<D> for Tensor<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 Txn = T
type Txn = T
The type of Transaction
to expect
sourcefn max(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn max(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the maximum of this Tensor
along the given axis
.
sourcefn max_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
fn max_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
Return the maximum element in this Tensor
.
sourcefn min(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn min(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the minimum of this Tensor
along the given axis
.
sourcefn min_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
fn min_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
Return the minimum element in this Tensor
.
sourcefn product(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn product(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the product of this Tensor
along the given axis
.
sourcefn product_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
fn product_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
Return the product of all elements in this Tensor
.
sourcefn sum(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn sum(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the sum of this Tensor
along the given axis
.
sourcefn sum_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
fn sum_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
Return the sum of all elements in this Tensor
.
sourceimpl<FD, FS, D, T> TensorTransform for Tensor<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> TensorTransform for Tensor<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>,
sourceimpl<FD, FS, D, T> TensorTrig for Tensor<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> TensorTrig for Tensor<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>,
sourceimpl<FD, FS, D, T> TensorUnary<D> for Tensor<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> TensorUnary<D> for Tensor<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 Txn = T
type Txn = T
The type of Transaction
to expect
sourcefn all<'async_trait>(
self,
txn: T
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>> where
Self: 'async_trait,
fn all<'async_trait>(
self,
txn: T
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>> where
Self: 'async_trait,
Return true
if all elements in this Tensor
are nonzero.
Auto Trait Implementations
impl<FD, FS, D, T> !RefUnwindSafe for Tensor<FD, FS, D, T>
impl<FD, FS, D, T> Send for Tensor<FD, FS, D, T> where
D: Send + Sync,
FD: Send,
FS: Send + Sync,
T: Send + Sync,
impl<FD, FS, D, T> Sync for Tensor<FD, FS, D, T> where
D: Send + Sync,
FD: Sync,
FS: Send + Sync,
T: Send + Sync,
impl<FD, FS, D, T> Unpin for Tensor<FD, FS, D, T> where
D: Unpin,
FD: Unpin,
FS: Unpin,
T: Unpin,
impl<FD, FS, D, T> !UnwindSafe for Tensor<FD, FS, D, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F> Match for F
impl<F> Match for F
sourcefn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
Returns true
if self
can be cast into the target type T
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
sourcefn can_cast_from(&F) -> bool
fn can_cast_from(&F) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn 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
.
sourceimpl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
sourcefn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if self
can be cast into T
.
sourcefn 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
.
sourcefn 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
.