Trait tc_tensor::TensorUnary [−][src]
pub trait TensorUnary<D: Dir> {
type Txn: Transaction<D>;
type Unary: TensorInstance;
fn abs(&self) -> TCResult<Self::Unary>;
fn exp(&self) -> TCResult<Self::Unary>;
fn all<'async_trait>(
self,
txn: Self::Txn
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>
where
Self: 'async_trait;
fn any<'async_trait>(
self,
txn: Self::Txn
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>
where
Self: 'async_trait;
fn not(&self) -> TCResult<Self::Unary>;
}Expand description
Unary Tensor operations
Associated Types
type Txn: Transaction<D>
type Txn: Transaction<D>
The type of Transaction to expect
type Unary: TensorInstance
type Unary: TensorInstance
The return type of a unary operation
Required methods
Return true if all elements in this Tensor are nonzero.
Return true if any element in this Tensor is nonzero.