The mother class representing abstract sets.
More...
#include <marmoteSet.h>
|
| marmoteSet (marmoteSet **list, int nb, opType t) |
| Constructor for composite sets, from smaller sets. More...
|
|
virtual | ~marmoteSet () |
|
virtual long int | cardinal () |
| Cardinal of the set. More...
|
|
virtual bool | isFinite ()=0 |
| Test if the set is finite. More...
|
|
bool | isSimple () |
| Test if the set is a simple, elementary set. More...
|
|
bool | isUnion () |
| Test if the set is a composite, product set. More...
|
|
bool | isProduct () |
| Test if the set is a composite, product set. More...
|
|
int | totNbDims () |
| Read accessor to the total number of dimensions. More...
|
|
virtual void | enumerate () |
| Enumerates the set: lists all elements of the set. PROBLEM: enumerate where? in a file? to be specified more precisely. More...
|
|
virtual void | firstState (int *buffer) |
| Procedure that initializes the state buffer to the first state in the set. More...
|
|
virtual 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...
|
|
virtual void | decodeState (int index, int *buffer) |
| Procedure that converts an index into a state. The state is written in the buffer provided. The array must have been allocated before. More...
|
|
int | index (int *buffer) |
| Function that computes the number (index) of some state in the order of the set. The base class provides an implementation that uses solely firstState(), nextState(), and state comparison. For efficiency, it is advised to re-implement this method for derived classes. More...
|
|
virtual bool | isZero (int *buffer) |
| Function that tests whether a state is the first state (state zero) or not. More...
|
|
virtual void | printState (FILE *out, int *buffer) |
| Procedure to print a state, given by its full description, to some file descriptor. More...
|
|
virtual void | printState (FILE *out, int index) |
| Procedure to print a state, given by its index, to some file descriptor. More...
|
|
The mother class representing abstract sets.
marmoteSet::marmoteSet |
( |
marmoteSet ** |
list, |
|
|
int |
nb, |
|
|
opType |
t |
|
) |
| |
Constructor for composite sets, from smaller sets.
- Parameters
-
list | the list of elements in the composite |
nb | the number of elements in the composite |
t | the type of composite: UNION or PRODUCT |
marmoteSet::~marmoteSet |
( |
| ) |
|
|
virtual |
Destructor for general sets. Essentially for composite structures.
long int marmoteSet::cardinal |
( |
| ) |
|
|
virtual |
Cardinal of the set.
- Returns
- an integer, the cardinal of the set, or INFINITE_STATE_SPACE_SIZE
void marmoteSet::decodeState |
( |
int |
index, |
|
|
int * |
buffer |
|
) |
| |
|
virtual |
Procedure that converts an index into a state. The state is written in the buffer provided. The array must have been allocated before.
- Parameters
-
index | index of the state to be decoded |
buffer | state buffer containing the resulting state |
Reimplemented in marmoteBox, and marmoteInterval.
void marmoteSet::enumerate |
( |
| ) |
|
|
virtual |
Enumerates the set: lists all elements of the set. PROBLEM: enumerate where? in a file? to be specified more precisely.
Reimplemented in marmoteInterval.
void marmoteSet::firstState |
( |
int * |
buffer | ) |
|
|
virtual |
Procedure that initializes the state buffer to the first state in the set.
- Parameters
-
buffer | the buffer to be initialized. Must have been allocated before. |
Reimplemented in marmoteInterval, and marmoteBox.
int marmoteSet::index |
( |
int * |
buffer | ) |
|
Function that computes the number (index) of some state in the order of the set. The base class provides an implementation that uses solely firstState(), nextState(), and state comparison. For efficiency, it is advised to re-implement this method for derived classes.
- Parameters
-
buffer | state buffer containing the state |
- Returns
- the index of the state
virtual bool marmoteSet::isFinite |
( |
| ) |
|
|
pure virtual |
bool marmoteSet::isProduct |
( |
| ) |
|
|
inline |
Test if the set is a composite, product set.
- Returns
- true if the set is a product, false otherwise.
bool marmoteSet::isSimple |
( |
| ) |
|
|
inline |
Test if the set is a simple, elementary set.
- Returns
- true if the set is elementary, false otherwise.
bool marmoteSet::isUnion |
( |
| ) |
|
|
inline |
Test if the set is a composite, product set.
- Returns
- true if the set is a product, false otherwise.
bool marmoteSet::isZero |
( |
int * |
buffer | ) |
|
|
virtual |
Function that tests whether a state is the first state (state zero) or not.
- Parameters
-
buffer | the state to be tested |
- Returns
- true if the state is zero, false otherwise.
Reimplemented in marmoteInterval, and marmoteBox.
void marmoteSet::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 in marmoteInterval, and marmoteBox.
void marmoteSet::printState |
( |
FILE * |
out, |
|
|
int * |
buffer |
|
) |
| |
|
virtual |
Procedure to print a state, given by its full description, to some file descriptor.
- Parameters
-
out | the file descriptor to be used |
buffer | the state to be printed |
Reimplemented in marmoteBox, and marmoteInterval.
void marmoteSet::printState |
( |
FILE * |
out, |
|
|
int |
index |
|
) |
| |
|
virtual |
Procedure to print a state, given by its index, to some file descriptor.
- Parameters
-
out | the file descriptor to be used |
index | index of the state to be printed |
int marmoteSet::totNbDims |
( |
| ) |
|
|
inline |
Read accessor to the total number of dimensions.
- Returns
- The total number of dimensions of a vector representation.
long int marmoteSet::_cardinal |
|
protected |
array of dimensions, in case of a product
bool marmoteSet::_isProduct |
|
protected |
indicator that the set is a cartesian product of other sets
bool marmoteSet::_isSimple |
|
protected |
indicator that the set is simple (elementary)
bool marmoteSet::_isUnion |
|
protected |
indicator that the set is a union of other sets
int marmoteSet::_nbDimensions |
|
protected |
number of dimensions if this is a product
number of subsets if this is a union
int* marmoteSet::_zeroState |
|
protected |
the representation of the initial state (static)
array of zones, in case of a union
The documentation for this class was generated from the following files: