Trait ha_ndarray::NDArrayMathScalar
source · 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§
sourcefn add_scalar(
self,
rhs: Self::DType
) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>
fn add_scalar( self, rhs: Self::DType ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>
Construct a scalar addition operation.
sourcefn div_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>
Construct a scalar division operation.
sourcefn log_scalar(
self,
base: 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>
Construct a scalar logarithm operation.
sourcefn mul_scalar(
self,
rhs: 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>
Construct a scalar multiplication operation.
sourcefn pow_scalar(
self,
exp: 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>
Construct a scalar exponentiation operation.
Object Safety§
This trait is not object safe.