[][src]Struct libtectonic::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

impl Send for Histogram

impl Sync for Histogram

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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