Skip to main content

Summarizer

Trait Summarizer 

Source
pub trait Summarizer: Send + Sync {
    // Provided methods
    fn histogram(
        &self,
        values: &[Option<f64>],
        bins: usize,
    ) -> Option<(f64, f64, Vec<usize>)> { ... }
    fn summarize(
        &self,
        data: &TableData,
        spec: &TableSpec,
    ) -> Vec<ColumnSummary> { ... }
}
Expand description

Where a table’s summaries are computed: on the CPU here by default (CpuSummarizer), or by a backend the app plugs in (TableView::with_summarizer): a GPU histogram through kitchen-compute, a data-frame library, a server that already holds the table. A backend may replace only Summarizer::histogram (the costly part for numbers) or the whole Summarizer::summarize. Called off the UI thread.

Provided Methods§

Source

fn histogram( &self, values: &[Option<f64>], bins: usize, ) -> Option<(f64, f64, Vec<usize>)>

The minimum, the maximum and the counts in bins equal bins of a number column’s finite values (None when it has none).

Source

fn summarize(&self, data: &TableData, spec: &TableSpec) -> Vec<ColumnSummary>

Every column’s summary.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§