pub trait VectorSpace<V, S = f64> {
// Required methods
fn add(&self, x: &V, y: &V) -> V;
fn sub(&self, x: &V, y: &V) -> V;
fn scale(&self, scalar: S, x: &V) -> V;
fn zero(&self) -> V;
fn dimension(&self) -> Option<usize>;
}Expand description
A vector space over a scalar field.
This is the most fundamental algebraic structure, providing addition and scalar multiplication.
§Type Parameters
V- The type of vectors in the spaceS- The scalar field (typicallyf64orComplex<f64>)