[][src]Trait lsh_rs::VecHash

pub trait VecHash<N> {
    fn hash_vec_query(&self, v: &[N]) -> Hash;

    fn hash_vec_put(&self, v: &[N]) -> Hash { ... }
fn as_query_directed_probe(&self) -> Option<&dyn QueryDirectedProbe<N>> { ... } }

Implement this trait to create your own custom hashers. In case of a symmetrical hash function, only hash_vec_query needs to be implemented.

Required methods

fn hash_vec_query(&self, v: &[N]) -> Hash

Create a hash for a query data point.

Loading content...

Provided methods

fn hash_vec_put(&self, v: &[N]) -> Hash

Create a hash for a data point that is being stored.

fn as_query_directed_probe(&self) -> Option<&dyn QueryDirectedProbe<N>>

Loading content...

Implementors

impl<N: Numeric + Float> VecHash<N> for MIPS<N>[src]

impl<N: Numeric + Float> VecHash<N> for L2<N>[src]

impl<N: Numeric> VecHash<N> for SignRandomProjections<N>[src]

Loading content...