RollingFeature

Trait RollingFeature 

Source
pub trait RollingFeature<T: Clone>: Vec1View<T> {
Show 16 methods // Provided methods fn ts_sum_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O> where T: Number, f64: Cast<U> { ... } fn ts_sum<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T: Number, f64: Cast<U> { ... } fn ts_mean_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O> where T: Number, f64: Cast<U> { ... } fn ts_mean<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T: Number, f64: Cast<U> { ... } fn ts_ewm_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O> where T: Number, f64: Cast<U> { ... } fn ts_ewm<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T: Number, f64: Cast<U> { ... } fn ts_wma_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O> where T: Number, f64: Cast<U> { ... } fn ts_wma<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T: Number, f64: Cast<U> { ... } fn ts_std_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O> where T: Number, f64: Cast<U> { ... } fn ts_std<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T: Number, f64: Cast<U> { ... } fn ts_var_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O> where T: Number, f64: Cast<U> { ... } fn ts_var<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T: Number, f64: Cast<U> { ... } fn ts_skew_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O> where T: Number, f64: Cast<U> { ... } fn ts_skew<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T: Number, f64: Cast<U> { ... } fn ts_kurt_to<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, out: Option<O::UninitRefMut<'_>>, ) -> Option<O> where T: Number, f64: Cast<U> { ... } fn ts_kurt<O: Vec1<U>, U>( &self, window: usize, min_periods: Option<usize>, ) -> O where T: Number, f64: Cast<U> { ... }
}

Provided Methods§

Source

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

Calculates the rolling sum 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 sum values.

§See Also

ts_vsum - The version of this function that handles None values.

Source

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

Calculates the rolling sum 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 sum values.

§See Also

ts_vsum - The version of this function that handles None values.

Source

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

Calculates the rolling mean 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 mean values.

§See Also

ts_vmean - The version of this function that handles None values.

Source

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

Calculates the rolling mean 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 mean values.

§See Also

ts_vmean - The version of this function that handles None values.

Source

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

Calculates the exponentially weighted moving average 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 exponentially weighted moving average values.

§See Also

ts_vewm - The version of this function that handles None values.

Source

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

Calculates the exponentially weighted moving average 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 exponentially weighted moving average values.

§See Also

ts_vewm - The version of this function that handles None values.

Source

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

Calculates the weighted moving average 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 weighted moving average values.

§See Also

ts_vwma - The version of this function that handles None values.

Source

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

Calculates the weighted moving average 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 weighted moving average values.

§See Also

ts_vwma - The version of this function that handles None values.

Source

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

Calculates the rolling standard deviation 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 standard deviation values.

§See Also

ts_vstd - The version of this function that handles None values.

Source

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

Calculates the rolling standard deviation 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 standard deviation values.

§See Also

ts_vstd - The version of this function that handles None values.

Source

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

Calculates the rolling variance 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 variance values.

§See Also

ts_vvar - The version of this function that handles None values.

Source

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

Calculates the rolling variance 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 variance values.

§See Also

ts_vvar - The version of this function that handles None values.

Source

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

Calculates the rolling skewness 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 skewness values.

§See Also

ts_vskew - The version of this function that handles None values.

Source

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

Calculates the rolling skewness 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 skewness values.

§See Also

ts_vskew - The version of this function that handles None values.

Source

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

Calculates the rolling kurtosis 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 kurtosis values.

§See Also

ts_vkurt - The version of this function that handles None values.

Source

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

Calculates the rolling kurtosis 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 kurtosis values.

§See Also

ts_vkurt - The version of this function that handles 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§

Source§

impl<T: Clone, I: Vec1View<T>> RollingFeature<T> for I