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 ln(&self) -> TCResult<Self::Unary>;
    fn round(&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

Required Associated Types

The type of Transaction to expect

The return type of a unary operation

Required Methods

Element-wise absolute value

Element-wise exponentiation

Element-wise natural logarithm

Element-wise round to the nearest integer

Return true if all elements in this Tensor are nonzero.

Return true if any element in this Tensor is nonzero.

Element-wise logical not

Implementors