Trait ha_ndarray::NDArrayMath
source · 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§
sourcefn add(
self,
rhs: O
) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>
fn add( self, rhs: O ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>
Construct an addition operation with the given rhs
.
sourcefn div(
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>
Construct a division operation with the given rhs
.
sourcefn log(
self,
base: O
) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>
fn log( self, base: O ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>
Construct a logarithm operation with the given base
.
sourcefn mul(
self,
rhs: O
) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>
fn mul( self, rhs: O ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>
Construct a multiplication operation with the given rhs
.
sourcefn pow(
self,
exp: O
) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>
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 exp
onent.
Object Safety§
This trait is not object safe.