VecAggValidExt

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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