[][src]Trait lsh_rs::VecHash

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

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

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]) -> Vec<K>

Create a hash for a query data point.

Loading content...

Provided methods

fn hash_vec_put(&self, v: &[N]) -> Vec<K>

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

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

If the hasher implements the QueryDirectedProbe trait it should return Some(self)

fn as_step_wise_probe(&self) -> Option<&dyn StepWiseProbe<N, K>>

If the hasher implements the StepWiseProbe trait it should return Some(self)

Loading content...

Implementors

impl<N, K> VecHash<N, K> for L2<N, K> where
    N: Numeric + Float,
    K: Integer
[src]

impl<N, K> VecHash<N, K> for MIPS<N, K> where
    N: Numeric + Float,
    K: Integer
[src]

impl<N, K> VecHash<N, K> for MinHash<N, K> where
    N: Integer,
    K: Integer
[src]

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

Loading content...