Struct criterion_stats::bivariate::Data
source · pub struct Data<'a, X, Y>(_, _)
where
X: 'a,
Y: 'a;
Expand description
Bivariate (X, Y)
data
Invariants:
- No
NaN
s in the data - At least two data points in the set
Implementations§
source§impl<'a, X, Y> Data<'a, X, Y>where
X: Float,
Y: Float,
impl<'a, X, Y> Data<'a, X, Y>where
X: Float,
Y: Float,
sourcepub fn new(xs: &'a [X], ys: &'a [Y]) -> Data<'a, X, Y>
pub fn new(xs: &'a [X], ys: &'a [Y]) -> Data<'a, X, Y>
Creates a new data set from two existing slices
sourcepub fn bootstrap<T, S>(&self, nresamples: usize, statistic: S) -> T::Distributionswhere
S: Fn(Data<'_, X, Y>) -> T + Sync,
T: Tuple,
T::Distributions: Send,
T::Builder: Send,
pub fn bootstrap<T, S>(&self, nresamples: usize, statistic: S) -> T::Distributionswhere
S: Fn(Data<'_, X, Y>) -> T + Sync,
T: Tuple,
T::Distributions: Send,
T::Builder: Send,
Returns the bootstrap distributions of the parameters estimated by the statistic
- Multi-threaded
- Time:
O(nresamples)
- Memory:
O(nresamples)