|
linbox
|
Helper. More...
#include <benchmark.h>
Public Member Functions | |
| TimeWatcher (dvector_t &pts, dvector_t &vals) | |
| constructor. More... | |
| TimeWatcher () | |
| Null Constructor. The pointers are intialised to NULL. | |
| dvector_t & | refX () |
| returns the vector of abscissa (points) | |
| dvector_t & | refY () |
| returns the vector of ordiantes (values) | |
| double | predict (double x) |
| Prediction for the next experiment time. More... | |
| bool | keepon (size_t &repet, double tim, bool usePrediction=false) |
| Watches a timer and a number and repet and signals if over. More... | |
| size_t | size () const |
| size | |
| void | clear () |
| clear the pointers (not the settings) | |
Helper.
This helper has several functions :
See member function help for more information.
| TimeWatcher | ( | dvector_t & | pts, |
| dvector_t & | vals | ||
| ) |
constructor.
Inits the time watcher with a pair of points/values
| pts | vector of points |
| vals | vector of times |
| double predict | ( | double | x | ) |
Prediction for the next experiment time.
It is assumed that predict(0)=0. If Curent_<3, a linear, then quadratic fit is done. Other wise, a cubic fit is performed.
| x | the next evaluation point. |
| bool keepon | ( | size_t & | repet, |
| double | tim, | ||
| bool | usePrediction = false |
||
| ) |
Watches a timer and a number and repet and signals if over.
We want at least 2 repetions but not more than maxtime spent on timing.
| repet | number of previous repetitions. Should be 0 on the first time keepon is called. |
| tim | timer to watch |
| maxtime | maximum time (in seconds) until watchon tells stop. |
true if we conditions are not met to stop, false otherwise. tim should have been started previously !
1.8.13