nalgebra/src/traits/dot.rs
2013-05-16 21:59:41 +00:00

15 lines
408 B
Rust

pub trait Dot<T>
{
/// Computes the dot (inner) product of two objects.
fn dot(&self, &Self) -> T;
/// Computes the norm a an object.
fn norm(&self) -> T;
/**
* Computes the squared norm of an object.
*
* Computes the squared norm of an object. Computation of the squared norm
* is usually faster than the norm itself.
*/
fn sqnorm(&self) -> T; // { self.dot(self); }
}