Trait NDArrayUnary

Source
pub trait NDArrayUnary: NDArray + Sized {
    type Output: Access<Self::DType>;

    // Required methods
    fn abs(
        self,
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn exp(
        self,
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn ln(
        self,
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn round(
        self,
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
}
Expand description

Unary array operations

Required Associated Types§

Source

type Output: Access<Self::DType>

The return type of a unary operation.

Required Methods§

Source

fn abs(self) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>

Construct an absolute value operation.

Source

fn exp(self) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>

Construct an exponentiation operation.

Source

fn ln(self) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>

Construct a natural logarithm operation.

Source

fn round( self, ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>

Construct an integer rounding operation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§