Struct TSlidingWindow

Inheritance Relationships

Base Type

  • public mrpt::config::CLoadableOptions

Struct Documentation

struct TSlidingWindow : public mrpt::config::CLoadableOptions

Class to monitor the evolution of a statistical quantity.

Public Functions

TSlidingWindow(const std::string &name = "window")
~TSlidingWindow() override = default
double getMedian()

Return the current median value.

double getMean()

Return the current mean value.

double getStdDev()

Return the Standard deviation of the current measurement vector.

bool evaluateMeasurementInGaussian(double measurement)

Determine whether the incoming measurement is inside the [-3sigma, +3sigma] boundaries from the current mean value.

Returns:

True if it’s inside the uncertainty boundaries

bool evaluateMeasurementAbove(double value)

Determine whether the incoming measurement is over the current mean value.

Returns:

True if it’s above the mean

bool evaluateMeasurementBelow(double value)

Determine whether the incoming measurement is less or equal to the current mean value.

Returns:

True if it’s <= to the mean

void addNewMeasurement(double measurement)

Update the sliding window by appending a new measurement.

void resizeWindow(size_t new_size)

Resize the window.

Note

Method affects the underlying vector only if the new_size specified has already been reached

virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string &section) override
virtual void dumpToTextStream(std::ostream &out) const override
size_t getWindowSize() const

Return the size of the window.

bool windowIsFull() const

Check if the window has reached its limit. This limit is set by the user via the resizeWindow method.

See also

resizeWindow