KrisLibrary
1.0.0
|
Division of the real numbers into interval sets. Each interval is assigned data of type Data. More...
#include <IntervalMap.h>
Public Member Functions | |
void | Clear () |
Sets the interval to be (-inf,inf) | |
void | InitSplit (Real split) |
Creates the intervals (-inf,split],(split,inf) | |
void | InitPartition (size_t n, Real a, Real b) |
Creates n uniformly spaced intervals betwen a,b. | |
void | Fill (const Data &val) |
Fills all intervals with the given value. | |
void | IntervalRange (int index, Real &min, Real &max) const |
Returns the range of the interval indexed by index. | |
int | GetIntervalIndex (Real val) const |
Returns the index of the interval containing val. | |
const Data & | GetIntervalData (Real val) const |
Returns the data of the interval containing val. | |
Data & | GetIntervalData (Real val) |
Public Attributes | |
std::vector< Real > | divs |
std::vector< Data > | intervals |
divs.size()+1 intervals (-inf,x0],(x1,x2],...,(xn-1,xn],(xn,inf) | |
Division of the real numbers into interval sets. Each interval is assigned data of type Data.