|
Last change
on this file since 510 was 350, checked in by ansari, 26 years ago |
|
Gestion TRANGE, MJD0, PERECH....
|
|
File size:
775 bytes
|
| Line | |
|---|
| 1 | // toiinterpolator.h
|
|---|
| 2 | // Eric Aubourg CEA/DAPNIA/SPP juillet 1999
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 | #ifndef TOIINTERPOLATOR_H
|
|---|
| 6 | #define TOIINTERPOLATOR_H
|
|---|
| 7 |
|
|---|
| 8 | #include <deque>
|
|---|
| 9 |
|
|---|
| 10 | using namespace std;
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | class TOIInterpolator {
|
|---|
| 14 | public:
|
|---|
| 15 |
|
|---|
| 16 | void enterValue(double value, long sample);
|
|---|
| 17 | bool needMoreDataFor(long sample); // need more data ? (for interp)
|
|---|
| 18 | bool canGet(long sample); // enough info ?
|
|---|
| 19 | double getIValue(long sample); // can forget before sample
|
|---|
| 20 | double getEValue(long sample); // can forget before sample
|
|---|
| 21 | bool isNewValue(long sample);
|
|---|
| 22 | long nextSample(long sampleMin); // the next true sample available
|
|---|
| 23 |
|
|---|
| 24 | protected:
|
|---|
| 25 | struct pair {
|
|---|
| 26 | pair(double v, long tt) : val(v), t(tt) {}
|
|---|
| 27 | pair() {}
|
|---|
| 28 | double val;
|
|---|
| 29 | long t;
|
|---|
| 30 | };
|
|---|
| 31 |
|
|---|
| 32 | deque<pair> hist;
|
|---|
| 33 | };
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | #endif
|
|---|
| 37 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.