pub trait NDArrayMath<O: NDArray<DType = Self::DType>>: NDArray + Sized {
    type Output: Access<Self::DType>;

    // Required methods
    fn add(
        self,
        rhs: O
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn div(
        self,
        rhs: O
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn log(
        self,
        base: O
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn mul(
        self,
        rhs: O
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn pow(
        self,
        exp: O
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn sub(
        self,
        rhs: O
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn rem(
        self,
        rhs: O
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
}
Expand description

Array arithmetic operations

Required Associated Types§

Required Methods§

source

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

Construct an addition operation with the given rhs.

source

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

Construct a division operation with the given rhs.

source

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

Construct a logarithm operation with the given base.

source

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

Construct a multiplication operation with the given rhs.

source

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

Construct an operation to raise these data to the power of the given exponent.

source

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

Construct an array subtraction operation with the given rhs.

source

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

Construct a modulo operation with the given rhs.

Object Safety§

This trait is not object safe.

Implementors§