pub enum Operation {
Dot,
Similarity,
Bind,
Unbind,
Bundle,
Negate,
Hamming,
}Expand description
Operation types for dispatch decisions.
Variants§
Dot
Dot product (popcount-optimal)
Similarity
Cosine similarity
Bind
Bind operation (XOR-like composition)
Unbind
Unbind operation (inverse of bind)
Bundle
Bundle (majority voting)
Negate
Element-wise negation
Hamming
Hamming distance
Implementations§
Source§impl Operation
impl Operation
Sourcepub fn preferred_format(self) -> Format
pub fn preferred_format(self) -> Format
Returns the preferred format for this operation.
Sourcepub fn benefits_from_sparse(self) -> bool
pub fn benefits_from_sparse(self) -> bool
Returns true if this operation can benefit from sparse representation.
Trait Implementations§
impl Copy for Operation
impl Eq for Operation
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
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