pub struct Ecdf<T>where
T: PartialOrd + Copy,{ /* private fields */ }Expand description
Empirical cumulative distribution function
Is calculated by sorting the list of samples and represents step-like
approximation to cdf of underling distribution.
The value of ecdf for some x ∈ [xᵢ, xᵢ₊₁) is i/N where N is the total
number of samples.
One can iterate over the ordered samples of ecdf and their associated values as below:
let ecdf = Ecdf::new(vec![0.1, 0.0, 0.7 ,0.2])?;
for (ecdf_value, s) in &ecdf {
println!("{s} {ecdf_value}")
}Implementations§
Trait Implementations§
Source§impl<'a, T> IntoIterator for &'a Ecdf<T>where
T: PartialOrd + Copy,
impl<'a, T> IntoIterator for &'a Ecdf<T>where
T: PartialOrd + Copy,
Auto Trait Implementations§
impl<T> Freeze for Ecdf<T>
impl<T> RefUnwindSafe for Ecdf<T>where
T: RefUnwindSafe,
impl<T> Send for Ecdf<T>where
T: Send,
impl<T> Sync for Ecdf<T>where
T: Sync,
impl<T> Unpin for Ecdf<T>where
T: Unpin,
impl<T> UnwindSafe for Ecdf<T>where
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