pub trait Vector {
type Scalar;
// Required methods
fn add_vec(&self, rhs: &Self) -> Self;
fn sub_vec(&self, rhs: &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(&self, rhs: &Self) -> Self
fn sub_vec(&self, rhs: &Self) -> Self
fn mul_scalar(&self, rhs: Self::Scalar) -> Self
Object Safety§
This trait is not object safe.