pub trait TensorUnary {
    type Unary: TensorInstance;

    // Required methods
    fn abs(self) -> TCResult<Self::Unary>;
    fn exp(self) -> TCResult<Self::Unary>;
    fn ln(self) -> TCResult<Self::Unary>;
    fn round(self) -> TCResult<Self::Unary>;
}
Expand description

Unary Tensor operations

Required Associated Types§

source

type Unary: TensorInstance

The return type of a unary operation

Required Methods§

source

fn abs(self) -> TCResult<Self::Unary>

Element-wise absolute value

source

fn exp(self) -> TCResult<Self::Unary>

Element-wise exponentiation

source

fn ln(self) -> TCResult<Self::Unary>

Element-wise natural logarithm

source

fn round(self) -> TCResult<Self::Unary>

Element-wise round to the nearest integer

Implementors§

source§

impl<Txn, FE> TensorUnary for DenseView<Txn, FE>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node> + Clone,

§

type Unary = DenseView<Txn, FE>

source§

impl<Txn, FE> TensorUnary for Tensor<Txn, FE>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node> + Clone,

§

type Unary = Tensor<Txn, FE>

source§

impl<Txn, FE> TensorUnary for SparseView<Txn, FE>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>,

§

type Unary = SparseView<Txn, FE>

source§

impl<Txn, FE, A> TensorUnary for SparseTensor<Txn, FE, A>
where Txn: ThreadSafe, FE: ThreadSafe, A: SparseInstance,

§

type Unary = SparseTensor<Txn, FE, SparseUnary<A, <A as SparseInstance>::DType>>

source§

impl<Txn: ThreadSafe, FE: ThreadSafe, A: DenseInstance> TensorUnary for DenseTensor<Txn, FE, A>

§

type Unary = DenseTensor<Txn, FE, DenseUnary<A, <A as DenseInstance>::DType>>