Trait rstats::MutVecg

source ·
pub trait MutVecg {
    // Required methods
    fn mutsmult<U: PartialOrd + Into<f64>>(self, _s: U);
    fn mutvsub<U: Clone + PartialOrd + Into<f64>>(self, _v: &[U]);
    fn mutvadd<U: Clone + PartialOrd + Into<f64>>(self, _v: &[U]);
    fn minvert(self);
    fn mneg(self);
    fn munit(self);
    fn mlintrans(self);
}
Expand description

Mutable operations on one generic slice. A few of the essential Vecg methods are reimplemented here to mutate self. This is for efficiency and convenience. For example, in vector iterative methods.

Required Methods§

source

fn mutsmult<U: PartialOrd + Into<f64>>(self, _s: U)

mutable multiplication by a scalar

source

fn mutvsub<U: Clone + PartialOrd + Into<f64>>(self, _v: &[U])

mutable vector subtraction

source

fn mutvadd<U: Clone + PartialOrd + Into<f64>>(self, _v: &[U])

mutable vector addition

source

fn minvert(self)

Invert the magnitude

source

fn mneg(self)

Negate the vector (all components swap sign)

source

fn munit(self)

Make into a unit vector

source

fn mlintrans(self)

Linearly transform to interval [0,1]

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl MutVecg for &mut [f64]

Mutable vector operations on &mut [f64], where the operand endtype is generic

source§

fn mutsmult<U: PartialOrd + Into<f64>>(self, s: U)

Scalar multiplication of a vector, mutates self

source§

fn mutvsub<U: Clone + PartialOrd + Into<f64>>(self, v: &[U])

Vector subtraction, mutates self

source§

fn mutvadd<U: Clone + PartialOrd + Into<f64>>(self, v: &[U])

Vector addition, mutates self

source§

fn minvert(self)

Vector with inverse magnitude

source§

fn munit(self)

Unit vector

source§

fn mlintrans(self)

Linear transform to interval [0,1]

source§

fn mneg(self)

Implementors§