pub enum Mode {
Exact,
Asymptotic,
Auto,
}Expand description
The computation mode for a test that offers both an exact (combinatorial) null distribution and an asymptotic (large-sample) approximation.
Mirrors scipy’s method argument for the rank and goodness-of-fit tests.
Self::Exact enumerates the exact null distribution (correct for small
samples but combinatorially expensive); Self::Asymptotic uses the normal
or Kolmogorov approximation (cheap, accurate for large samples);
Self::Auto resolves to exact below a documented per-test sample-size
threshold and to asymptotic at or above it.
Variants§
Exact
Enumerate the exact combinatorial null distribution.
Asymptotic
Use the large-sample (normal / Kolmogorov) approximation.
Auto
Pick exact below the threshold, asymptotic at or above it.
Implementations§
Source§impl Mode
impl Mode
Sourcepub const fn resolve(self, n: usize, threshold: usize) -> Self
pub const fn resolve(self, n: usize, threshold: usize) -> Self
Resolves Self::Auto for sample size n against the per-test
threshold, returning the effective mode actually used.
Self::Exact and Self::Asymptotic pass through unchanged;
Self::Auto becomes Self::Exact when n < threshold and
Self::Asymptotic otherwise.
§Arguments
n— the governing sample size for the test (per-test definition).threshold— the size at or above whichAutochooses asymptotic.
§Returns
Self::Exact or Self::Asymptotic (never Self::Auto).