|
AGX Dynamics 2.41.1.2
|
Median statistic that keeps a history of a number of observations and reports the median, i.e., middle element in sorted order, of that. More...
#include <Statistic.h>
Inheritance diagram for agxUtil::MedianStatistic:Public Member Functions | |
| MedianStatistic (size_t maxHistorySize) | |
| void | clear () |
| virtual agx::Real | get () const override |
| size_t | getCurrentHistorySize () const |
| const agx::RealVector & | getHistoryByAge () const |
| const agx::RealVector & | getHistoryByValue () const |
| size_t | getMaxHistorySize () const |
| virtual agx::Real | update (agx::Real observation) override |
| Ad a new observation to the history, removing the oldest if the maximum history size has been reached. | |
Public Member Functions inherited from agxUtil::Statistic | |
| virtual | ~Statistic () |
| virtual agx::Real | get () const =0 |
| virtual agx::Real | update (agx::Real observation)=0 |
| Updates the statistic given the current observation and returns the current value of this statistic. | |
Static Public Member Functions | |
| static StatisticHandleRef | make_statistic (size_t maxHistorySize) |
Median statistic that keeps a history of a number of observations and reports the median, i.e., middle element in sorted order, of that.
Definition at line 180 of file Statistic.h.
|
inline |
| maxHistorySize | - The number of observations to keep in the history. |
Definition at line 186 of file Statistic.h.
|
inline |
Definition at line 238 of file Statistic.h.
|
inlineoverridevirtual |
Implements agxUtil::Statistic.
Definition at line 196 of file Statistic.h.
|
inline |
Definition at line 252 of file Statistic.h.
References agxAssert.
|
inline |
Definition at line 260 of file Statistic.h.
|
inline |
Definition at line 266 of file Statistic.h.
|
inline |
Definition at line 245 of file Statistic.h.
|
inlinestatic |
Definition at line 271 of file Statistic.h.
Ad a new observation to the history, removing the oldest if the maximum history size has been reached.
Implements agxUtil::Statistic.
Definition at line 219 of file Statistic.h.