[][src]Struct tdb_core::postprocessing::histogram::Histogram

pub struct Histogram {
    pub boundaries: Vec<f64>,
    // some fields omitted
}

Create a histogram along some dimension, for example price Basically, put a list of prices into bins

Fields

boundaries: Vec<f64>

lower boundary of the bin

Methods

impl Histogram[src]

pub fn new(prices: &[f64], bin_count: BinCount, m: f64) -> Histogram[src]

create a new histogram from a list of price and reject outliers m is the threshold for z-score

pub fn to_bin(&self, price: f64) -> Option<f64>[src]

convert value to lower boundary of the bin

pub fn from(
    ups: &[Update],
    step_bins: BinCount,
    tick_bins: BinCount,
    m: f64
) -> (Histogram, Histogram)
[src]

get spatial temporal histograms from a list of update returns price history and time histogram m is value of z-score cutoff

pub fn index(&self, price: f64) -> usize[src]

get index of the bin based on boundary price which is the lower boundary of the bin

Trait Implementations

impl Debug for Histogram[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,