Struct sampling::histogram::GenericAtomicHist
source · pub struct GenericAtomicHist<B, T> { /* private fields */ }
Expand description
Provides Histogram functionallity
- Is automatically implemented for any type that implements Binning
Implementations§
Trait Implementations§
source§impl<B, T> AtomicHistogram for GenericAtomicHist<B, T>
impl<B, T> AtomicHistogram for GenericAtomicHist<B, T>
source§fn hist(&self) -> &[AtomicUsize]
fn hist(&self) -> &[AtomicUsize]
the created histogram Read more
source§fn count_multiple_index(
&self,
index: usize,
count: usize
) -> Result<(), HistErrors>
fn count_multiple_index( &self, index: usize, count: usize ) -> Result<(), HistErrors>
source§fn count_index(&self, index: usize) -> Result<(), HistErrors>
fn count_index(&self, index: usize) -> Result<(), HistErrors>
source§fn any_bin_zero(&self) -> bool
fn any_bin_zero(&self) -> bool
check if any bin was not hit yet Read more
source§impl<B, T> AtomicHistogramVal<T> for GenericAtomicHist<B, T>where
B: Binning<T>,
impl<B, T> AtomicHistogramVal<T> for GenericAtomicHist<B, T>where
B: Binning<T>,
source§fn get_bin_index<V: Borrow<T>>(&self, val: V) -> Result<usize, HistErrors>
fn get_bin_index<V: Borrow<T>>(&self, val: V) -> Result<usize, HistErrors>
convert val to the respective histogram index
source§fn count_val<V: Borrow<T>>(&self, val: V) -> Result<usize, HistErrors>
fn count_val<V: Borrow<T>>(&self, val: V) -> Result<usize, HistErrors>
count val.
Ok(index)
, if inside of hist, Err(_)
if val is invalidsource§fn borders_clone(&self) -> Result<Vec<T>, HistErrors>
fn borders_clone(&self) -> Result<Vec<T>, HistErrors>
binning borders Read more
source§fn distance<V: Borrow<T>>(&self, val: V) -> f64
fn distance<V: Borrow<T>>(&self, val: V) -> f64
calculates some sort of absolute distance to the nearest valid bin Read more
source§fn first_border(&self) -> T
fn first_border(&self) -> T
get the left most border (inclusive)
source§fn not_inside<V: Borrow<T>>(&self, val: V) -> bool
fn not_inside<V: Borrow<T>>(&self, val: V) -> bool
opposite of
is_inside
source§fn last_border(&self) -> T
fn last_border(&self) -> T
Get border on the right Read more
Auto Trait Implementations§
impl<B, T> RefUnwindSafe for GenericAtomicHist<B, T>where
B: RefUnwindSafe,
T: RefUnwindSafe,
impl<B, T> Send for GenericAtomicHist<B, T>
impl<B, T> Sync for GenericAtomicHist<B, T>
impl<B, T> Unpin for GenericAtomicHist<B, T>
impl<B, T> UnwindSafe for GenericAtomicHist<B, T>where
B: UnwindSafe,
T: UnwindSafe,
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
§impl<S, T> Cast<T> for Swhere
T: Conv<S>,
impl<S, T> Cast<T> for Swhere
T: Conv<S>,
§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
§fn cast_approx(self) -> T
fn cast_approx(self) -> T
§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
§fn try_cast_trunc(self) -> Result<T, Error>
fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
§fn try_cast_nearest(self) -> Result<T, Error>
fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
§fn try_cast_floor(self) -> Result<T, Error>
fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
§fn try_cast_ceil(self) -> Result<T, Error>
fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more