pub struct AngularEmbedding { /* private fields */ }Expand description
Angular embedding projector
Implementations§
Source§impl AngularEmbedding
impl AngularEmbedding
Sourcepub fn new(lane: PrecisionLane) -> Self
pub fn new(lane: PrecisionLane) -> Self
Create a new angular embedding projector
Sourcepub fn unproject(&self, angles: &[f32], target_magnitude: f32) -> Vec<f32>
pub fn unproject(&self, angles: &[f32], target_magnitude: f32) -> Vec<f32>
Unproject from angular space to Euclidean
Sourcepub fn angular_distance(&self, a: &[f32], b: &[f32]) -> f32
pub fn angular_distance(&self, a: &[f32], b: &[f32]) -> f32
Compute angular distance between two vectors
Sourcepub fn update_velocity(&mut self, previous: &[f32], current: &[f32])
pub fn update_velocity(&mut self, previous: &[f32], current: &[f32])
Update angular velocity (for streaming embeddings)
Sourcepub fn get_velocity(&self) -> &[f32]
pub fn get_velocity(&self) -> &[f32]
Get current angular velocity
Sourcepub fn predict_next(&self, current: &[f32]) -> Vec<f32>
pub fn predict_next(&self, current: &[f32]) -> Vec<f32>
Predict next position based on angular velocity
Trait Implementations§
Source§impl Clone for AngularEmbedding
impl Clone for AngularEmbedding
Source§fn clone(&self) -> AngularEmbedding
fn clone(&self) -> AngularEmbedding
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AngularEmbedding
impl RefUnwindSafe for AngularEmbedding
impl Send for AngularEmbedding
impl Sync for AngularEmbedding
impl Unpin for AngularEmbedding
impl UnwindSafe for AngularEmbedding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more