pub trait VectorSpace:
Clone
+ Send
+ Sync {
// Required methods
fn dim(&self) -> usize;
fn zero(dim: usize) -> Self;
fn add(&self, other: &Self) -> Self;
fn scale(&self, factor: f32) -> Self;
fn as_slice(&self) -> &[f32];
}Expand description
Operations on a vector space.
Defines the algebraic structure that embedding vectors inhabit. Implementations are not required for Layer 0 — only signatures.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.