Skip to main content

Projection

Trait Projection 

Source
pub trait Projection: Send + Sync {
    // Required methods
    fn project(&self, embedding: &Embedding) -> SphericalPoint;
    fn dimensionality(&self) -> usize;

    // Provided method
    fn project_rich(&self, embedding: &Embedding) -> ProjectedPoint { ... }
}
Expand description

Maps high-dimensional embeddings to spherical coordinates.

The angular coordinates (theta, phi) encode semantic direction via dimensionality reduction from S^{n-1} to S^2. The radial coordinate is controlled by the projection’s RadialStrategy.

Required Methods§

Source

fn project(&self, embedding: &Embedding) -> SphericalPoint

Source

fn dimensionality(&self) -> usize

Provided Methods§

Source

fn project_rich(&self, embedding: &Embedding) -> ProjectedPoint

Project with rich metadata: certainty, intensity, projection magnitude.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<P: Projection> Projection for Arc<P>

Implementors§