Trait tc_tensor::TensorReduce [−][src]
pub trait TensorReduce<D: Dir> { type Txn: Transaction<D>; type Reduce: TensorInstance; fn product(self, axis: usize) -> TCResult<Self::Reduce>; fn product_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>; fn sum(self, axis: usize) -> TCResult<Self::Reduce>; fn sum_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>; }
Expand description
Tensor reduction operations
Associated Types
type Txn: Transaction<D>
type Txn: Transaction<D>
The type of Transaction to expect
type Reduce: TensorInstance
type Reduce: TensorInstance
The result type of a reduce operation
Required methods
Return the product of this Tensor along the given axis.
fn product_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
fn product_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
Return the product of all elements in this Tensor.
Return the sum of this Tensor along the given axis.
fn sum_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
fn sum_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
Return the sum of all elements in this Tensor.