Trait tea_agg::VecAggValidExt

source ·
pub trait VecAggValidExt<T: IsNone>: Vec1View<T> {
    // Provided methods
    fn vquantile(&self, q: f64, method: QuantileMethod) -> TResult<f64>
       where T: Cast<f64>,
             T::Inner: Number { ... }
    fn vmedian(&self) -> f64
       where T: Cast<f64>,
             T::Inner: Number { ... }
}
Expand description

Extension trait providing additional aggregation methods for vectors with potentially invalid (None) values.

Provided Methods§

source

fn vquantile(&self, q: f64, method: QuantileMethod) -> TResult<f64>
where T: Cast<f64>, T::Inner: Number,

Calculate the quantile of the vector, ignoring NaN or None values.

§Arguments
  • q - The quantile to calculate, must be between 0 and 1.
  • method - The method to use for quantile calculation.
§Returns

Returns a TResult<f64> containing the calculated quantile value.

§Errors

Returns an error if q is not between 0 and 1.

source

fn vmedian(&self) -> f64
where T: Cast<f64>, T::Inner: Number,

Calculate the median of the vector, ignoring NaN or None values.

§Returns

Returns the median value as an f64.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<V: Vec1View<T>, T: IsNone> VecAggValidExt<T> for V