pub trait Vector {
type Scalar;
// Required methods
fn add_vec<'a, 'b>(&'a self, rhs: &'b Self) -> Self;
fn sub_vec<'a, 'b>(&'a self, rhs: &'b Self) -> Self;
fn mul_scalar(&self, rhs: Self::Scalar) -> Self;
}
Expand description
Mathematical Vector
Description
Vector has two operations : addition, scalar multiplication. And a space of the vector should closed for that operations.
Required Associated Types§
Required Methods§
fn add_vec<'a, 'b>(&'a self, rhs: &'b Self) -> Self
fn sub_vec<'a, 'b>(&'a self, rhs: &'b Self) -> Self
fn mul_scalar(&self, rhs: Self::Scalar) -> Self
Object Safety§
This trait is not object safe.