A class that provids a simple linear 2d interpolation lookup table. More...
#include <interpolater.hxx>
Public Member Functions | |
| SGInterpTable () | |
| Constructor. | |
| SGInterpTable (const SGPropertyNode *interpolation) | |
| Constructor. | |
| SGInterpTable (const string &file) | |
| Constructor. | |
| void | addEntry (double ind, double dep) |
| Add an entry to the table, extending the table's length. | |
| double | interpolate (double x) const |
| Given an x value, linearly interpolate the y value from the table. | |
| ~SGInterpTable () | |
| Destructor. | |
A class that provids a simple linear 2d interpolation lookup table.
The actual table is expected to be loaded from a file. The independant variable must be strictly ascending. The dependent variable can be anything.
Definition at line 53 of file interpolater.hxx.
| SGInterpTable::SGInterpTable | ( | ) |
| SGInterpTable::SGInterpTable | ( | const SGPropertyNode * | interpolation | ) |
Constructor.
Loads the interpolation table from an interpolation property node.
| interpolation | property node having entry children |
Definition at line 48 of file interpolater.cxx.
| SGInterpTable::SGInterpTable | ( | const string & | file | ) |
Constructor.
Loads the interpolation table from the specified file.
| file | name of interpolation file |
Definition at line 60 of file interpolater.cxx.
| void SGInterpTable::addEntry | ( | double | ind, | |
| double | dep | |||
| ) |
Add an entry to the table, extending the table's length.
| ind | The independent variable. | |
| dep | The dependent variable. |
Definition at line 81 of file interpolater.cxx.
| double SGInterpTable::interpolate | ( | double | x | ) | const |
Given an x value, linearly interpolate the y value from the table.
| x | independent variable |
Definition at line 87 of file interpolater.cxx.
1.6.1