fn calculate_statistic_nonallocating<T: Ord + Clone>(
    xs: &mut [T],
    ys: &mut [T],
) -> Result<f64, TestError> {
    if xs.is_empty() || ys.is_empty() {
        return Err(TestError::SequenceHasFewerThanEightElements);
    }

    xs.sort();
    ys.sort();

    Ok(calculate_statistic_inner_presorted(xs, ys))
}
/// Calculate the test statistic for the two sample Kolmogorov-Smirnov test.
///
/// The test statistic is the maximum vertical distance between the ECDFs of
/// the two samples.
///
/// This function sorts the input samples.
Calculate the test statistic for the two sample Kolmogorov-Smirnov test.
The test statistic is the maximum vertical distance between the ECDFs of
the two samples.

This function sorts the input samples.
Calculate the test statistic for the two sample Kolmogorov - Smirnov test . The test statistic is the maximum vertical distance between the ECDFs of the two samples . This function sorts the input samples .
fn calculate_statistic_nonallocating<T: Ord + Clone>(
    xs: &mut [T],
    ys: &mut [T],
) -> Result<f64, TestError> {
    if xs.is_empty() || ys.is_empty() {
        return Err(TestError::SequenceHasFewerThanEightElements);
    }
    xs.sort();
    ys.sort();
    Ok(calculate_statistic_inner_presorted(xs, ys))
}
fn calculate_statistic_nonallocating < T : Ord + Clone > ( xs : & mut [ T ] , ys : & mut [ T ] , ) -> Result < f64 , TestError > { if xs . is_empty ( ) || ys . is_empty ( ) { return Err ( TestError :: SequenceHasFewerThanEightElements ) ; } xs . sort ( ) ; ys . sort ( ) ; Ok ( calculate_statistic_inner_presorted ( xs , ys ) ) }
Calculate the test statistic for the two sample Kolmogorov-Smirnov test.
Calculate the test statistic for the two sample Kolmogorov - Smirnov test .
xs
&mut [T]
ys
&mut [T]
xs
&mut [T]
ys
&mut [T]