pub trait VecFloatExt {
    fn vecadd(&mut self, x: &[f64], c: f64);
fn vecdot(&self, other: &[f64]) -> f64;
fn veccpy(&mut self, x: &[f64]);
fn vecncpy(&mut self, x: &[f64]);
fn vecdiff(&mut self, x: &[f64], y: &[f64]);
fn vecscale(&mut self, c: f64);
fn vec2norm(&self) -> f64;
fn vec2norminv(&self) -> f64;
fn vecdist_squared(&self, other: &[f64]) -> f64; fn vecdist(&self, other: &[f64]) -> f64 { ... } }
Expand description

Abstracting simple vector based math operations

Required methods

y += c*x

vector dot product s = x.dot(y)

y = z

y = -x

z = x - y

y *= c

||x||, L2 norm

1 / ||x||

d = ||a-b||^2

Provided methods

d = ||a-b||

Implementations on Foreign Types

y += c*x

s = y.dot(x)

y *= c

y = x

y = -x

z = x - y

||x||, L2 norm

1/||x||

d = ||a-b||^2

Implementors