Trait ElementWise

Source
pub trait ElementWise<Rhs = Self> {
    // Required methods
    fn add_element_wise(self, rhs: Rhs) -> Self;
    fn sub_element_wise(self, rhs: Rhs) -> Self;
    fn mul_element_wise(self, rhs: Rhs) -> Self;
    fn div_element_wise(self, rhs: Rhs) -> Self;
    fn rem_element_wise(self, rhs: Rhs) -> Self;
    fn add_assign_element_wise(&mut self, rhs: Rhs);
    fn sub_assign_element_wise(&mut self, rhs: Rhs);
    fn mul_assign_element_wise(&mut self, rhs: Rhs);
    fn div_assign_element_wise(&mut self, rhs: Rhs);
    fn rem_assign_element_wise(&mut self, rhs: Rhs);
}
Expand description

Element-wise arithmetic operations. These are supplied for pragmatic reasons, but will usually fall outside of traditional algebraic properties.

Required Methods§

Source

fn add_element_wise(self, rhs: Rhs) -> Self

Source

fn sub_element_wise(self, rhs: Rhs) -> Self

Source

fn mul_element_wise(self, rhs: Rhs) -> Self

Source

fn div_element_wise(self, rhs: Rhs) -> Self

Source

fn rem_element_wise(self, rhs: Rhs) -> Self

Source

fn add_assign_element_wise(&mut self, rhs: Rhs)

Source

fn sub_assign_element_wise(&mut self, rhs: Rhs)

Source

fn mul_assign_element_wise(&mut self, rhs: Rhs)

Source

fn div_assign_element_wise(&mut self, rhs: Rhs)

Source

fn rem_assign_element_wise(&mut self, rhs: Rhs)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<S> ElementWise for Point1<S>
where S: BaseNum,

Source§

impl<S> ElementWise for Point2<S>
where S: BaseNum,

Source§

impl<S> ElementWise for Point3<S>
where S: BaseNum,

Source§

impl<S> ElementWise for Vector1<S>
where S: BaseNum,

Source§

impl<S> ElementWise for Vector2<S>
where S: BaseNum,

Source§

impl<S> ElementWise for Vector3<S>
where S: BaseNum,

Source§

impl<S> ElementWise for Vector4<S>
where S: BaseNum,

Source§

impl<S> ElementWise<S> for Point1<S>
where S: BaseNum,

Source§

impl<S> ElementWise<S> for Point2<S>
where S: BaseNum,

Source§

impl<S> ElementWise<S> for Point3<S>
where S: BaseNum,

Source§

impl<S> ElementWise<S> for Vector1<S>
where S: BaseNum,

Source§

impl<S> ElementWise<S> for Vector2<S>
where S: BaseNum,

Source§

impl<S> ElementWise<S> for Vector3<S>
where S: BaseNum,

Source§

impl<S> ElementWise<S> for Vector4<S>
where S: BaseNum,