pub struct SparseVecBackend;Expand description
Default backend for today: the existing SparseVec substrate.
Trait Implementations§
Source§impl Clone for SparseVecBackend
impl Clone for SparseVecBackend
Source§fn clone(&self) -> SparseVecBackend
fn clone(&self) -> SparseVecBackend
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 moreSource§impl Debug for SparseVecBackend
impl Debug for SparseVecBackend
Source§impl Default for SparseVecBackend
impl Default for SparseVecBackend
Source§fn default() -> SparseVecBackend
fn default() -> SparseVecBackend
Returns the “default value” for a type. Read more
Source§impl VsaBackend for SparseVecBackend
impl VsaBackend for SparseVecBackend
type Vector = SparseVec
fn zero(&self) -> Self::Vector
fn bundle(&self, a: &Self::Vector, b: &Self::Vector) -> Self::Vector
fn bind(&self, a: &Self::Vector, b: &Self::Vector) -> Self::Vector
fn cosine(&self, a: &Self::Vector, b: &Self::Vector) -> f64
fn encode_data( &self, data: &[u8], config: &ReversibleVSAConfig, path: Option<&str>, ) -> Self::Vector
fn decode_data( &self, vec: &Self::Vector, config: &ReversibleVSAConfig, path: Option<&str>, expected_size: usize, ) -> Vec<u8> ⓘ
impl Copy for SparseVecBackend
Auto Trait Implementations§
impl Freeze for SparseVecBackend
impl RefUnwindSafe for SparseVecBackend
impl Send for SparseVecBackend
impl Sync for SparseVecBackend
impl Unpin for SparseVecBackend
impl UnwindSafe for SparseVecBackend
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