papergrid

Trait Estimate

Source
pub trait Estimate<R> {
    // Required methods
    fn estimate(&mut self, records: R, cfg: &GridConfig);
    fn get(&self, i: usize) -> Option<usize>;
    fn total(&self) -> usize;
}
Expand description

An Evaluator of an metric of a Grid

Required Methods§

Source

fn estimate(&mut self, records: R, cfg: &GridConfig)

Estimates a metric.

Source

fn get(&self, i: usize) -> Option<usize>

Gets a metric by index.

Source

fn total(&self) -> usize

Calculates a sum of metrics.

Implementors§

Source§

impl<R> Estimate<R> for HeightEstimator
where R: Records,

Source§

impl<R> Estimate<R> for WidthEstimator
where R: Records,