pub struct HashBiasTable {
pub config: CMSConfig,
pub alpha: f32,
pub threshold: i8,
pub positive_retention: f32,
pub negative_retention: f32,
pub max_fold_enrichment: f32,
/* private fields */
}Fields§
§config: CMSConfig§alpha: f32§threshold: i8§positive_retention: f32§negative_retention: f32§max_fold_enrichment: f32Implementations§
Source§impl HashBiasTable
impl HashBiasTable
pub fn create( positive_paths: &[&Path], negative_paths: &[&Path], config: &BiasCreateConfig, progress: Option<ProgressBar>, ) -> Result<Self>
pub fn weight(&self, hash: u64) -> i8
pub fn passes_filter(&self, hash: u64) -> bool
pub fn k(&self) -> u8
pub fn fscale(&self) -> u64
pub fn fold_enrichment(&self) -> f32
pub fn save(&self, path: &Path) -> Result<()>
pub fn load(path: &Path) -> Result<Self>
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn from_bytes(data: &[u8]) -> Result<Self>
pub fn weight_stats(&self) -> (f32, f32, f32, f32, usize)
pub fn memory_usage(&self) -> usize
pub fn threshold_f32(&self) -> f32
pub fn print_stats(&self)
Trait Implementations§
Source§impl Clone for HashBiasTable
impl Clone for HashBiasTable
Source§fn clone(&self) -> HashBiasTable
fn clone(&self) -> HashBiasTable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HashBiasTable
impl Debug for HashBiasTable
Source§impl PartialEq for HashBiasTable
impl PartialEq for HashBiasTable
Auto Trait Implementations§
impl Freeze for HashBiasTable
impl RefUnwindSafe for HashBiasTable
impl Send for HashBiasTable
impl Sync for HashBiasTable
impl Unpin for HashBiasTable
impl UnwindSafe for HashBiasTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more