[−][src]Trait lsh_rs::VecHash
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.
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)
Implementors
impl<N, K> VecHash<N, K> for L2<N, K> where
N: Numeric + Float,
K: Integer,
[src]
N: Numeric + Float,
K: Integer,
fn hash_vec_query(&self, v: &[N]) -> Vec<K>
[src]
fn as_query_directed_probe(&self) -> Option<&dyn QueryDirectedProbe<N, K>>
[src]
impl<N, K> VecHash<N, K> for MIPS<N, K> where
N: Numeric + Float,
K: Integer,
[src]
N: Numeric + Float,
K: Integer,
fn hash_vec_query(&self, v: &[N]) -> Vec<K>
[src]
fn hash_vec_put(&self, v: &[N]) -> Vec<K>
[src]
impl<N, K> VecHash<N, K> for MinHash<N, K> where
N: Integer,
K: Integer,
[src]
N: Integer,
K: Integer,