[−][src]Struct tdb_core::postprocessing::histogram::Histogram
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]
ups: &[Update],
step_bins: BinCount,
tick_bins: BinCount,
m: f64
) -> (Histogram, Histogram)
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
Auto Trait Implementations
impl RefUnwindSafe for Histogram
impl Send for Histogram
impl Sync for Histogram
impl Unpin for Histogram
impl UnwindSafe for Histogram
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,