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

    // Required methods
    fn add_scalar(
        self,
        rhs: Self::DType
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn div_scalar(
        self,
        rhs: Self::DType
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn log_scalar(
        self,
        base: Self::DType
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn mul_scalar(
        self,
        rhs: Self::DType
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn pow_scalar(
        self,
        exp: Self::DType
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn rem_scalar(
        self,
        rhs: Self::DType
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn sub_scalar(
        self,
        rhs: Self::DType
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
}
Expand description

Array arithmetic operations with a scalar argument

Required Associated Types§

Required Methods§

source

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

Construct a scalar addition operation.

source

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

Construct a scalar division operation.

source

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

Construct a scalar logarithm operation.

source

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

Construct a scalar multiplication operation.

source

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

Construct a scalar exponentiation operation.

source

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

Construct a scalar modulo operation.

source

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

Construct a scalar subtraction operation.

Object Safety§

This trait is not object safe.

Implementors§