The class describing a finite integer interval.
More...
#include <marmoteInterval.h>
|
| marmoteInterval (int min, int max) |
|
bool | isFinite () |
| Test if the set is finite. These sets always are. More...
|
|
bool | isZero (int *buffer) |
|
void | firstState (int *buffer) |
| Initializes some state buffer with the first state of the set. More...
|
|
void | nextState (int *buffer) |
| Procedure to compute the state following a given state in the set order. The new state is computed in place: the original state is erased. By convention, the state following the last state is the first state. More...
|
|
void | decodeState (int index, int *buf) |
| More...
|
|
int | index (int *buf) |
| More...
|
|
void | printState (FILE *out, int *buffer) |
| More...
|
|
void | enumerate () |
| Enumeration procedure. More...
|
|
The class describing a finite integer interval.
marmoteInterval::marmoteInterval |
( |
int |
min, |
|
|
int |
max |
|
) |
| |
Constructor for an interval. By convention, if max < min, then the interval is empty. Otherwise, both min and max are inside the interval.
- Author
- Alain Jean-Marie
- Parameters
-
min | the low end of the interval |
max | the high end of the interval |
void marmoteInterval::decodeState |
( |
int |
index, |
|
|
int * |
buf |
|
) |
| |
|
virtual |
void marmoteInterval::enumerate |
( |
| ) |
|
|
virtual |
Enumeration procedure.
Reimplemented from marmoteSet.
void marmoteInterval::firstState |
( |
int * |
buffer | ) |
|
|
virtual |
Initializes some state buffer with the first state of the set.
- Parameters
-
buffer | the buffer to be set. |
Reimplemented from marmoteSet.
int marmoteInterval::index |
( |
int * |
buf | ) |
|
bool marmoteInterval::isFinite |
( |
| ) |
|
|
inlinevirtual |
Test if the set is finite. These sets always are.
- Returns
- true
Implements marmoteSet.
void marmoteInterval::nextState |
( |
int * |
buffer | ) |
|
|
virtual |
Procedure to compute the state following a given state in the set order. The new state is computed in place: the original state is erased. By convention, the state following the last state is the first state.
- Parameters
-
buffer | the reference state |
Reimplemented from marmoteSet.
void marmoteInterval::printState |
( |
FILE * |
out, |
|
|
int * |
buffer |
|
) |
| |
|
virtual |
int marmoteInterval::_max |
|
protected |
the higher end of the interval
int marmoteInterval::_min |
|
protected |
the lower end of the interval
The documentation for this class was generated from the following files: