source: Sophya/trunk/Poubelle/archTOI.old/toiinterpolator.h@ 342

Last change on this file since 342 was 342, checked in by ansari, 26 years ago

archtoi 2 aout 99

File size: 698 bytes
RevLine 
[315]1#ifndef TOIINTERPOLATOR_H
2#define TOIINTERPOLATOR_H
3
4#include <deque>
5
[342]6using namespace std;
7
8
[315]9class TOIInterpolator {
10public:
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
[342]17 bool isNewValue(long sample);
[315]18 long nextSample(long sampleMin); // the next true sample available
19
20protected:
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.