pub struct EmbeddingVector {
pub values: Vec<f32>,
}Fields§
§values: Vec<f32>Implementations§
Source§impl EmbeddingVector
impl EmbeddingVector
pub fn cosine_similarity(&self, other: &Self) -> f32
Trait Implementations§
Source§impl Clone for EmbeddingVector
impl Clone for EmbeddingVector
Source§fn clone(&self) -> EmbeddingVector
fn clone(&self) -> EmbeddingVector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EmbeddingVector
impl Debug for EmbeddingVector
Source§impl PartialEq for EmbeddingVector
impl PartialEq for EmbeddingVector
Source§fn eq(&self, other: &EmbeddingVector) -> bool
fn eq(&self, other: &EmbeddingVector) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EmbeddingVector
Auto Trait Implementations§
impl Freeze for EmbeddingVector
impl RefUnwindSafe for EmbeddingVector
impl Send for EmbeddingVector
impl Sync for EmbeddingVector
impl Unpin for EmbeddingVector
impl UnsafeUnpin for EmbeddingVector
impl UnwindSafe for EmbeddingVector
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