Trait peroxide::traits::sugar::VecOps

source ·
pub trait VecOps: Sized + FPVector
where Self::Scalar: Copy + Clone + Add<Self::Scalar, Output = Self::Scalar> + Sub<Self::Scalar, Output = Self::Scalar> + Mul<Self::Scalar, Output = Self::Scalar> + Div<Self::Scalar, Output = Self::Scalar>,
{ // Provided methods fn add_v(&self, v: &Self) -> Self { ... } fn sub_v(&self, v: &Self) -> Self { ... } fn mul_v(&self, v: &Self) -> Self { ... } fn div_v(&self, v: &Self) -> Self { ... } fn add_s(&self, s: Self::Scalar) -> Self { ... } fn sub_s(&self, s: Self::Scalar) -> Self { ... } fn mul_s(&self, s: Self::Scalar) -> Self { ... } fn div_s(&self, s: Self::Scalar) -> Self { ... } }
Expand description

Syntactic sugar for Vector operations

Provided Methods§

source

fn add_v(&self, v: &Self) -> Self

source

fn sub_v(&self, v: &Self) -> Self

source

fn mul_v(&self, v: &Self) -> Self

source

fn div_v(&self, v: &Self) -> Self

source

fn add_s(&self, s: Self::Scalar) -> Self

source

fn sub_s(&self, s: Self::Scalar) -> Self

source

fn mul_s(&self, s: Self::Scalar) -> Self

source

fn div_s(&self, s: Self::Scalar) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl VecOps for Vec<AD>

source§

impl VecOps for Vec<f64>

source§

impl VecOps for Vec<Complex<f64>>

Implementors§