Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
 All Classes Functions Variables
Public Member Functions | Protected Attributes | List of all members
marmoteInterval Class Reference

The class describing a finite integer interval. More...

#include <marmoteInterval.h>

Inheritance diagram for marmoteInterval:
marmoteSet

Public Member Functions

 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...
 

Protected Attributes

int _min
 
int _max
 

Additional Inherited Members

- Private Member Functions inherited from marmoteSet
 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...
 
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 printState (FILE *out, int index)
 

Detailed Description

The class describing a finite integer interval.

Constructor & Destructor Documentation

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
minthe low end of the interval
maxthe high end of the interval

Member Function Documentation

void marmoteInterval::decodeState ( int  index,
int *  buf 
)
virtual

Reimplemented from marmoteSet.

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
bufferthe 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
bufferthe reference state

Reimplemented from marmoteSet.

void marmoteInterval::printState ( FILE *  out,
int *  buffer 
)
virtual

Reimplemented from marmoteSet.

Member Data Documentation

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: