Trait rustml::ops::MatrixScalarOps
[−]
[src]
pub trait MatrixScalarOps<T> { fn add_scalar(&self, scalar: T) -> Matrix<T>; fn sub_scalar(&self, scalar: T) -> Matrix<T>; fn mul_scalar(&self, scalar: T) -> Matrix<T>; fn div_scalar(&self, scalar: T) -> Matrix<T>; }
Trait for matrix scalar operations.
Required Methods
fn add_scalar(&self, scalar: T) -> Matrix<T>
Adds a scalar to each element of the matrix and returns the result.
fn sub_scalar(&self, scalar: T) -> Matrix<T>
Subtracts a scalar from each element of the matrix and returns the result.
fn mul_scalar(&self, scalar: T) -> Matrix<T>
Multiplies each element of the matrix with a scalar and returns the result.
fn div_scalar(&self, scalar: T) -> Matrix<T>
Divides each element of the matrix by a scalar and returns the result.
Implementors
impl MatrixScalarOps<usize> for Matrix<usize>
impl MatrixScalarOps<u8> for Matrix<u8>
impl MatrixScalarOps<u16> for Matrix<u16>
impl MatrixScalarOps<u32> for Matrix<u32>
impl MatrixScalarOps<u64> for Matrix<u64>
impl MatrixScalarOps<isize> for Matrix<isize>
impl MatrixScalarOps<i8> for Matrix<i8>
impl MatrixScalarOps<i16> for Matrix<i16>
impl MatrixScalarOps<i32> for Matrix<i32>
impl MatrixScalarOps<i64> for Matrix<i64>
impl MatrixScalarOps<f32> for Matrix<f32>
impl MatrixScalarOps<f64> for Matrix<f64>