monitors the history of some variable over iterations and computes the bounds over a specified window More...
#include <History_monitor.hpp>
Public Member Functions | |
| History_monitor (double window_size, int max_samples) | |
| void | add_sample (int iteration, double value) |
stipulates that the value of the variable to be monitored is value at iteration iteration | |
| double | min () |
| obtains the minimum of the variable over the window | |
| double | max () |
| obtains the maximum of the variable over the window | |
monitors the history of some variable over iterations and computes the bounds over a specified window
The class user supplies the value of the desired variable at certain iterations. The History_monitor will compute the maximum and minimum of these values over the last some-percent of the iterations. In case the number of iterations becomes large, there is a user-specified maximum number of samples, and the History_monitor will only record a fraction of the supplied data points at a frequency chosen to maintain the specified buffer size. Of course, values outside of the window are also forgotten.
| hexed::History_monitor::History_monitor | ( | double | window_size, |
| int | max_samples ) |
| window_size | Window size as a fraction of the iteration count. E.g. if window_size = .3, bounds will be computed over the last 30% of the iterations. |
| max_samples | Maximum sample buffer size. |