Loading...
Searching...
No Matches
etl::pseudo_moving_average< T, 0U, 1U, false, true > Class Template Reference

`#include <pseudo_moving_average.h>`

## Public Types

typedef T | value_type
typedef private_pseudo_moving_average::add_insert_iterator< this_t > | add_insert_iterator

## Public Member Functions

ETL_CONSTEXPR | pseudo_moving_average (const T initial_value, const size_t sample_size)
void | clear (const T initial_value)
void | set_sample_size (const size_t sample_size)
void | add (const T new_value)
T | value () const
add_insert_iterator | input ()

## Detailed Description

template<typename T>
class etl::pseudo_moving_average< T, 0U, 1U, false, true >

Pseudo Moving Average For floating point types.

Template Parameters

  T | The sample value type.

## Constructor & Destructor Documentation

## pseudo_moving_average()

template<typename T>

ETL_CONSTEXPR etl::pseudo_moving_average< T, 0U, 1U, false, true >::pseudo_moving_average | ( | const T | initial_value,
|  | const size_t | sample_size )

inline

Constructor

Parameters

  initial_value | The initial value for the average.

## Member Function Documentation

## add()

template<typename T>

void etl::pseudo_moving_average< T, 0U, 1U, false, true >::add | ( | const T | new_value | ) |

inline

Adds a new sample to the average.

Parameters

  new_value | The value to add.

## clear()

template<typename T>

void etl::pseudo_moving_average< T, 0U, 1U, false, true >::clear | ( | const T | initial_value | ) |

inline

Clears the average.

Parameters

  initial_value | The initial value for the average.

## input()

template<typename T>

add_insert_iterator etl::pseudo_moving_average< T, 0U, 1U, false, true >::input | ( |  | ) |

inline

Gets an iterator for input.

Returns
  An iterator.

## set_sample_size()

template<typename T>

void etl::pseudo_moving_average< T, 0U, 1U, false, true >::set_sample_size | ( | const size_t | sample_size | ) |

inline

Sets the sample size.

Parameters

  sample_size | The new sample size.

## value()

template<typename T>

T etl::pseudo_moving_average< T, 0U, 1U, false, true >::value | ( |  | ) | const

inline

Gets the current pseudo moving average.

Returns
  The current average.

The documentation for this class was generated from the following file:

- include/etl/pseudo_moving_average.h