Trait rustml::ops::VectorScalarOps [] [src]

pub trait VectorScalarOps<T> {
    fn mul_scalar(&self, scalar: T) -> Vec<T>;
    fn div_scalar(&self, scalar: T) -> Vec<T>;
    fn add_scalar(&self, scalar: T) -> Vec<T>;
    fn sub_scalar(&self, scalar: T) -> Vec<T>;
}

Trait for vector scalar operations.

Required Methods

fn mul_scalar(&self, scalar: T) -> Vec<T>

Multiplies each element of the vector with the scalar and returns the result.

fn div_scalar(&self, scalar: T) -> Vec<T>

Divides each element of the evector by the scalar and returns the result.

fn add_scalar(&self, scalar: T) -> Vec<T>

Adds a scalar to each element of the vector and returns the result.

fn sub_scalar(&self, scalar: T) -> Vec<T>

Subtracts a scalar from each element of the vector and returns the result.

Implementors