Line | |
---|
1 | #ifndef TOIINTERPOLATOR_H
|
---|
2 | #define TOIINTERPOLATOR_H
|
---|
3 |
|
---|
4 | #include <deque>
|
---|
5 |
|
---|
6 | using namespace std;
|
---|
7 |
|
---|
8 |
|
---|
9 | class TOIInterpolator {
|
---|
10 | public:
|
---|
11 |
|
---|
12 | void enterValue(double value, long sample);
|
---|
13 | bool needMoreDataFor(long sample); // need more data ? (for interp)
|
---|
14 | bool canGet(long sample); // enough info ?
|
---|
15 | double getIValue(long sample); // can forget before sample
|
---|
16 | double getEValue(long sample); // can forget before sample
|
---|
17 | bool isNewValue(long sample);
|
---|
18 | long nextSample(long sampleMin); // the next true sample available
|
---|
19 |
|
---|
20 | protected:
|
---|
21 | struct pair {
|
---|
22 | pair(double v, long tt) : val(v), t(tt) {}
|
---|
23 | pair() {}
|
---|
24 | double val;
|
---|
25 | long t;
|
---|
26 | };
|
---|
27 |
|
---|
28 | deque<pair> hist;
|
---|
29 | };
|
---|
30 |
|
---|
31 |
|
---|
32 | #endif
|
---|
33 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.