#include <RateLookup.h>
Public Member Functions | |
LookupTable () | |
LookupTable (double min, double max, unsigned int nDivs, unsigned int nSpecies) | |
number of species (no. of columns / 2) | |
void | addColumns (int species, const vector< double > &C1, const vector< double > &C2) |
Adds the columns for a given species. Columns supplied are C1 and C2. | |
void | column (unsigned int species, LookupColumn &column) |
void | row (double x, LookupRow &row) |
void | lookup (const LookupColumn &column, const LookupRow &row, double &C1, double &C2) |
Actually performs the lookup and the linear interpolation. |
LookupTable::LookupTable | ( | ) | [inline] |
LookupTable::LookupTable | ( | double | min, | |
double | max, | |||
unsigned int | nDivs, | |||
unsigned int | nSpecies | |||
) |
number of species (no. of columns / 2)
min | min of range | |
max | max of range | |
nDivs | number of divisions (~ no. of rows) |
void LookupTable::addColumns | ( | int | species, | |
const vector< double > & | C1, | |||
const vector< double > & | C2 | |||
) |
Adds the columns for a given species. Columns supplied are C1 and C2.
void LookupTable::column | ( | unsigned int | species, | |
LookupColumn & | column | |||
) |
References LookupColumn::column.
void LookupTable::lookup | ( | const LookupColumn & | column, | |
const LookupRow & | row, | |||
double & | C1, | |||
double & | C2 | |||
) |
Actually performs the lookup and the linear interpolation.
References a, LookupColumn::column, LookupRow::fraction, and LookupRow::row.
void LookupTable::row | ( | double | x, | |
LookupRow & | row | |||
) |
Returns the row corresponding to x in the "row" parameter. i.e., returns the leftover fraction and the row's start address.
References LookupRow::fraction, and LookupRow::row.