pub trait BinsBuildingStrategy {
    type Elem: Ord;

    fn from_array<S>(array: &ArrayBase<S, Ix1>) -> Self
    where
        S: Data<Elem = Self::Elem>
; fn build(&self) -> Bins<Self::Elem>; fn n_bins(&self) -> usize; }
Expand description

A trait implemented by all strategies to build Bins with parameters inferred from observations.

A BinsBuildingStrategy is required by GridBuilder to know how to build a Grid’s projections on the coordinate axes.

Required Associated Types

Required Methods

Given some observations in a 1-dimensional array it returns a BinsBuildingStrategy that has learned the required parameter to build a collection of Bins.

Returns a Bins instance, built accordingly to the parameters inferred from observations in from_array.

Returns the optimal number of bins, according to the parameters inferred from observations in from_array.

Implementors