Trait tc_tensor::TensorUnary
source · 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§
sourcetype Txn: Transaction<D>
type Txn: Transaction<D>
The type of Transaction
to expect
sourcetype Unary: TensorInstance
type Unary: TensorInstance
The return type of a unary operation
Required Methods§
sourcefn all<'async_trait>(
self,
txn: Self::Txn
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
fn all<'async_trait>(
self,
txn: Self::Txn
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
Return true
if all elements in this Tensor
are nonzero.