RollingValidCmp

Trait RollingValidCmp 

Source
pub trait RollingValidCmp<T: IsNone>: Vec1View<T> {
    // Provided methods
    fn ts_vargmin_to<O: Vec1<U>, U>(
        &self,
        window: usize,
        min_periods: Option<usize>,
        out: Option<O::UninitRefMut<'_>>,
    ) -> Option<O>
       where T::Inner: Number,
             f64: Cast<U> { ... }
    fn ts_vargmin<O: Vec1<U>, U>(
        &self,
        window: usize,
        min_periods: Option<usize>,
    ) -> O
       where T::Inner: Number,
             f64: Cast<U> { ... }
    fn ts_vmin_to<O: Vec1<U>, U>(
        &self,
        window: usize,
        min_periods: Option<usize>,
        out: Option<O::UninitRefMut<'_>>,
    ) -> Option<O>
       where T::Inner: Number,
             Option<T::Inner>: Cast<U> { ... }
    fn ts_vmin<O: Vec1<U>, U>(
        &self,
        window: usize,
        min_periods: Option<usize>,
    ) -> O
       where T::Inner: Number,
             Option<T::Inner>: Cast<U> { ... }
    fn ts_vargmax_to<O: Vec1<U>, U>(
        &self,
        window: usize,
        min_periods: Option<usize>,
        out: Option<O::UninitRefMut<'_>>,
    ) -> Option<O>
       where T::Inner: Number,
             f64: Cast<U> { ... }
    fn ts_vargmax<O: Vec1<U>, U>(
        &self,
        window: usize,
        min_periods: Option<usize>,
    ) -> O
       where T::Inner: Number,
             f64: Cast<U> { ... }
    fn ts_vmax_to<O: Vec1<U>, U>(
        &self,
        window: usize,
        min_periods: Option<usize>,
        out: Option<O::UninitRefMut<'_>>,
    ) -> Option<O>
       where T::Inner: Number,
             Option<T::Inner>: Cast<U> { ... }
    fn ts_vmax<O: Vec1<U>, U>(
        &self,
        window: usize,
        min_periods: Option<usize>,
    ) -> O
       where T::Inner: Number,
             Option<T::Inner>: Cast<U> { ... }
    fn ts_vrank_to<O: Vec1<U>, U>(
        &self,
        window: usize,
        min_periods: Option<usize>,
        pct: bool,
        rev: bool,
        out: Option<O::UninitRefMut<'_>>,
    ) -> Option<O>
       where T::Inner: Number,
             f64: Cast<U> { ... }
    fn ts_vrank<O: Vec1<U>, U>(
        &self,
        window: usize,
        min_periods: Option<usize>,
        pct: bool,
        rev: bool,
    ) -> O
       where T::Inner: Number,
             f64: Cast<U> { ... }
}
Expand description

Trait for performing rolling comparison operations on valid elements in vectors.

This trait provides methods for calculating rolling minimum, maximum, argmin, argmax, and rank operations on vectors of potentially nullable elements.

Provided Methods§

Source

fn ts_vargmin_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O>
where T::Inner: Number, f64: Cast<U>,

Calculates the rolling argmin (index of minimum value) for the vector.

§Arguments
  • window - The size of the rolling window.
  • min_periods - The minimum number of observations in window required to have a value.
  • out - Optional output buffer to store the results.
§Returns

A vector containing the rolling argmin values.

Source

fn ts_vargmin<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O
where T::Inner: Number, f64: Cast<U>,

Calculates the rolling argmin (index of minimum value) for the vector.

§Arguments
  • window - The size of the rolling window.
  • min_periods - The minimum number of observations in window required to have a value.
  • out - Optional output buffer to store the results.
§Returns

A vector containing the rolling argmin values.

Source

fn ts_vmin_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O>
where T::Inner: Number, Option<T::Inner>: Cast<U>,

Calculates the rolling minimum for the vector.

§Arguments
  • window - The size of the rolling window.
  • min_periods - The minimum number of observations in window required to have a value.
  • out - Optional output buffer to store the results.
§Returns

A vector containing the rolling minimum values.

Source

fn ts_vmin<O: Vec1<U>, U>(&self, window: usize, min_periods: Option<usize>) -> O
where T::Inner: Number, Option<T::Inner>: Cast<U>,

Calculates the rolling minimum for the vector.

§Arguments
  • window - The size of the rolling window.
  • min_periods - The minimum number of observations in window required to have a value.
  • out - Optional output buffer to store the results.
§Returns

A vector containing the rolling minimum values.

Source

fn ts_vargmax_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O>
where T::Inner: Number, f64: Cast<U>,

Calculates the rolling argmax (index of maximum value) for the vector.

§Arguments
  • window - The size of the rolling window.
  • min_periods - The minimum number of observations in window required to have a value.
  • out - Optional output buffer to store the results.
§Returns

A vector containing the rolling argmax values.

Source

fn ts_vargmax<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O
where T::Inner: Number, f64: Cast<U>,

Calculates the rolling argmax (index of maximum value) for the vector.

§Arguments
  • window - The size of the rolling window.
  • min_periods - The minimum number of observations in window required to have a value.
  • out - Optional output buffer to store the results.
§Returns

A vector containing the rolling argmax values.

Source

fn ts_vmax_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O>
where T::Inner: Number, Option<T::Inner>: Cast<U>,

Calculates the rolling maximum for the vector.

§Arguments
  • window - The size of the rolling window.
  • min_periods - The minimum number of observations in window required to have a value.
  • out - Optional output buffer to store the results.
§Returns

A vector containing the rolling maximum values.

Source

fn ts_vmax<O: Vec1<U>, U>(&self, window: usize, min_periods: Option<usize>) -> O
where T::Inner: Number, Option<T::Inner>: Cast<U>,

Calculates the rolling maximum for the vector.

§Arguments
  • window - The size of the rolling window.
  • min_periods - The minimum number of observations in window required to have a value.
  • out - Optional output buffer to store the results.
§Returns

A vector containing the rolling maximum values.

Source

fn ts_vrank_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, pct: bool, rev: bool, out: Option<O::UninitRefMut<'_>>, ) -> Option<O>
where T::Inner: Number, f64: Cast<U>,

Calculates the rolling rank for the vector.

§Arguments
  • window - The size of the rolling window.
  • min_periods - The minimum number of observations in window required to have a value.
  • pct - If true, return percentage rank, otherwise return absolute rank.
  • rev - If true, rank in descending order, otherwise rank in ascending order.
  • out - Optional output buffer to store the results.
§Returns

A vector containing the rolling rank values.

Source

fn ts_vrank<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, pct: bool, rev: bool, ) -> O
where T::Inner: Number, f64: Cast<U>,

Calculates the rolling rank for the vector.

§Arguments
  • window - The size of the rolling window.
  • min_periods - The minimum number of observations in window required to have a value.
  • pct - If true, return percentage rank, otherwise return absolute rank.
  • rev - If true, rank in descending order, otherwise rank in ascending order.
  • out - Optional output buffer to store the results.
§Returns

A vector containing the rolling rank values.

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<T: IsNone, I: Vec1View<T>> RollingValidCmp<T> for I