RollingValidFeature

Trait RollingValidFeature 

Source
pub trait RollingValidFeature<T: IsNone>: Vec1View<T> {
Show 16 methods // Provided methods fn ts_vsum_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_vsum<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T::Inner: Number, f64: Cast<U> { ... } fn ts_vmean_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_vmean<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T::Inner: Number, f64: Cast<U> { ... } fn ts_vewm_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_vewm<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T::Inner: Number, f64: Cast<U> { ... } fn ts_vwma_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_vwma<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T::Inner: Number, f64: Cast<U> { ... } fn ts_vstd_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_vstd<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T::Inner: Number, f64: Cast<U> { ... } fn ts_vvar_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_vvar<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T::Inner: Number, f64: Cast<U> { ... } fn ts_vskew_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_vskew<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T::Inner: Number, f64: Cast<U> { ... } fn ts_vkurt_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_vkurt<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T::Inner: Number, f64: Cast<U> { ... }
}
Expand description

Trait for rolling window operations on valid (non-None) elements.

Provided Methods§

Source

fn ts_vsum_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 sum of valid elements within a window.

§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.
§Returns

A vector containing the rolling sums.

§See Also

RollingFeature::ts_sum

Source

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

Calculates the rolling sum of valid elements within a window.

§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.
§Returns

A vector containing the rolling sums.

§See Also

RollingFeature::ts_sum

Source

fn ts_vmean_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 mean of valid elements within a window.

§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.
§Returns

A vector containing the rolling means.

§See Also

RollingFeature::ts_mean

Source

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

Calculates the rolling mean of valid elements within a window.

§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.
§Returns

A vector containing the rolling means.

§See Also

RollingFeature::ts_mean

Source

fn ts_vewm_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 exponentially weighted moving average of valid elements within a window.

§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.
§Returns

A vector containing the exponentially weighted moving averages.

§See Also

RollingFeature::ts_ewm

Source

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

Calculates the exponentially weighted moving average of valid elements within a window.

§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.
§Returns

A vector containing the exponentially weighted moving averages.

§See Also

RollingFeature::ts_ewm

Source

fn ts_vwma_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 weighted moving average of valid elements within a window.

§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.
§Returns

A vector containing the weighted moving averages.

§See Also

RollingFeature::ts_wma

Source

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

Calculates the weighted moving average of valid elements within a window.

§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.
§Returns

A vector containing the weighted moving averages.

§See Also

RollingFeature::ts_wma

Source

fn ts_vstd_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 standard deviation of valid elements within a window.

§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.
§Returns

A vector containing the rolling standard deviations.

§See Also

RollingFeature::ts_std

Source

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

Calculates the rolling standard deviation of valid elements within a window.

§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.
§Returns

A vector containing the rolling standard deviations.

§See Also

RollingFeature::ts_std

Source

fn ts_vvar_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 variance of valid elements within a window.

§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.
§Returns

A vector containing the rolling variances.

§See Also

RollingFeature::ts_var

Source

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

Calculates the rolling variance of valid elements within a window.

§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.
§Returns

A vector containing the rolling variances.

§See Also

RollingFeature::ts_var

Source

fn ts_vskew_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 skewness of valid elements within a window.

§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.
§Returns

A vector containing the rolling skewness values.

§See Also

RollingFeature::ts_skew

Source

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

Calculates the rolling skewness of valid elements within a window.

§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.
§Returns

A vector containing the rolling skewness values.

§See Also

RollingFeature::ts_skew

Source

fn ts_vkurt_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 kurtosis for the vector, handling None values.

§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 kurtosis values.

§See Also

ts_kurt - The version of this function that doesn’t handle None values.

Source

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

Calculates the rolling kurtosis for the vector, handling None values.

§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 kurtosis values.

§See Also

ts_kurt - The version of this function that doesn’t handle None 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§