Struct rv::dist::KsTwoAsymptotic
source · pub struct KsTwoAsymptotic {}
Expand description
Kolmogorov-Smirnov distribution where the number of samples, $N$, is assumed to be large.
This is the distribution of $\sqrt{N} D_n$ where $D_n = \sup_x |F_n(x) - F(x)|$ where $F$ is the true CDF and $F_n$ the empirical CDF.
§Example
Calculate the Survival Function for a particular KS stat.
use rv::traits::*;
use rv::dist::KsTwoAsymptotic;
let ks = KsTwoAsymptotic::default();
let sf = ks.sf(&1.0);
const EXPECTED: f64 = 0.26999967167735456;
assert!((sf - EXPECTED).abs() < 1E-15);
Implementations§
Trait Implementations§
source§impl Cdf<f32> for KsTwoAsymptotic
impl Cdf<f32> for KsTwoAsymptotic
source§impl Cdf<f64> for KsTwoAsymptotic
impl Cdf<f64> for KsTwoAsymptotic
source§impl Clone for KsTwoAsymptotic
impl Clone for KsTwoAsymptotic
source§fn clone(&self) -> KsTwoAsymptotic
fn clone(&self) -> KsTwoAsymptotic
Returns a copy 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 ContinuousDistr<f32> for KsTwoAsymptotic
impl ContinuousDistr<f32> for KsTwoAsymptotic
source§impl ContinuousDistr<f64> for KsTwoAsymptotic
impl ContinuousDistr<f64> for KsTwoAsymptotic
source§impl Debug for KsTwoAsymptotic
impl Debug for KsTwoAsymptotic
source§impl Default for KsTwoAsymptotic
impl Default for KsTwoAsymptotic
source§fn default() -> KsTwoAsymptotic
fn default() -> KsTwoAsymptotic
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for KsTwoAsymptotic
impl<'de> Deserialize<'de> for KsTwoAsymptotic
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for KsTwoAsymptotic
impl Display for KsTwoAsymptotic
source§impl From<&KsTwoAsymptotic> for String
impl From<&KsTwoAsymptotic> for String
source§fn from(_kstwobign: &KsTwoAsymptotic) -> String
fn from(_kstwobign: &KsTwoAsymptotic) -> String
Converts to this type from the input type.
source§impl HasDensity<f32> for KsTwoAsymptotic
impl HasDensity<f32> for KsTwoAsymptotic
source§impl HasDensity<f64> for KsTwoAsymptotic
impl HasDensity<f64> for KsTwoAsymptotic
source§impl InverseCdf<f32> for KsTwoAsymptotic
impl InverseCdf<f32> for KsTwoAsymptotic
source§impl InverseCdf<f64> for KsTwoAsymptotic
impl InverseCdf<f64> for KsTwoAsymptotic
source§impl Parameterized for KsTwoAsymptotic
impl Parameterized for KsTwoAsymptotic
type Parameters = ()
fn emit_params(&self) -> Self::Parameters
fn from_params(_params: Self::Parameters) -> Self
source§impl PartialEq for KsTwoAsymptotic
impl PartialEq for KsTwoAsymptotic
source§fn eq(&self, other: &KsTwoAsymptotic) -> bool
fn eq(&self, other: &KsTwoAsymptotic) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Sampleable<f32> for KsTwoAsymptotic
impl Sampleable<f32> for KsTwoAsymptotic
source§impl Sampleable<f64> for KsTwoAsymptotic
impl Sampleable<f64> for KsTwoAsymptotic
source§impl Serialize for KsTwoAsymptotic
impl Serialize for KsTwoAsymptotic
source§impl Support<f32> for KsTwoAsymptotic
impl Support<f32> for KsTwoAsymptotic
source§impl Support<f64> for KsTwoAsymptotic
impl Support<f64> for KsTwoAsymptotic
impl Copy for KsTwoAsymptotic
impl Eq for KsTwoAsymptotic
impl StructuralPartialEq for KsTwoAsymptotic
Auto Trait Implementations§
impl Freeze for KsTwoAsymptotic
impl RefUnwindSafe for KsTwoAsymptotic
impl Send for KsTwoAsymptotic
impl Sync for KsTwoAsymptotic
impl Unpin for KsTwoAsymptotic
impl UnwindSafe for KsTwoAsymptotic
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moresource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.