[−][src]Struct probminhash::probminhasher::ProbMinHash3a
implementation of the algorithm ProbMinHash3a as described in Etrl.
This version of ProbMinHash3 is faster but needs some more memory as it stores some states
between 2 passes on data.
Probminhash3a needs at least 2 hash values to run.
D must be convertible (at least partially) injectively into a usize for random generator initialization hence the requirement D:Hash.
If all data are referred to by an unsigned integer, and weight association is given in a tuple for example if
data comes in a Vec<(D,f64)> then D can be in fact replaced by the rank in the Vector, then no hash is need and you can use NoHasher
Implementations
impl<D, H> ProbMinHash3a<D, H> where
D: Copy + Eq + Debug + Hash,
H: Hasher + Default,
[src]
D: Copy + Eq + Debug + Hash,
H: Hasher + Default,
pub fn new(nbhash: usize, initobj: D) -> Self
[src]
Allocates a new ProbMinHash3a structure with nbhash >= 2 functions and initial object initobj to fill signature.
The precision on the final estimation depends on the number of hash functions.
The initial object can be any object , typically 0 for numerical objects.
pub fn hash_weigthed_idxmap<Hidx>(&mut self, data: &IndexMap<D, f64, Hidx>) where
Hidx: BuildHasher,
[src]
Hidx: BuildHasher,
It is the entry point of this hash algorithm. The indexmap gives multiplicity (or weight) to the objects hashed.
pub fn get_signature(&self) -> &Vec<D>
[src]
return final signature.
Auto Trait Implementations
impl<D, H> RefUnwindSafe for ProbMinHash3a<D, H> where
D: RefUnwindSafe,
H: RefUnwindSafe,
D: RefUnwindSafe,
H: RefUnwindSafe,
impl<D, H> Send for ProbMinHash3a<D, H> where
D: Send,
H: Send,
D: Send,
H: Send,
impl<D, H> Sync for ProbMinHash3a<D, H> where
D: Sync,
H: Sync,
D: Sync,
H: Sync,
impl<D, H> Unpin for ProbMinHash3a<D, H> where
D: Unpin,
H: Unpin,
D: Unpin,
H: Unpin,
impl<D, H> UnwindSafe for ProbMinHash3a<D, H> where
D: UnwindSafe,
H: UnwindSafe,
D: UnwindSafe,
H: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,