[][src]Struct bloomfilter::BloomFilter

pub struct BloomFilter {
    pub bitset: Vec<bool>,
    pub k: usize,
    pub n: usize,
    pub m: usize,
    pub murmur3_seeds: Vec<usize>,
}

Fields

bitset: Vec<bool>k: usizen: usizem: usizemurmur3_seeds: Vec<usize>

Methods

impl BloomFilter[src]

pub fn new(max_capacity: usize, target_error_rate: f64) -> Self[src]

pub fn add(&mut self, item: &[u8])[src]

pub fn get_hashes(&self, item: &[u8]) -> Vec<u128>[src]

pub fn check_existence(&self, item: &[u8]) -> bool[src]

pub fn error_rate(&self) -> f64[src]

pub fn optimal_bitset_size(capacity: usize, false_positive_rate: f64) -> usize[src]

pub fn hashfunctions_needed(bitset_size: usize, capacity: usize) -> usize[src]

Auto Trait Implementations

impl Send for BloomFilter

impl Sync for BloomFilter

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> FromPy for T[src]

impl<T, U> IntoPy for T where
    U: FromPy<T>, 
[src]