Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
marmoteBox.h
1 #ifndef MARMOTEBOX_H
2 #define MARMOTEBOX_H
3 
4 #include "marmoteSet.h"
5 
6 class marmoteBox : public marmoteSet
7 {
8 private:
9  int _nbDims;
10  int* _dimSize;
11  int* _lVal;
12  int* _uVal;
14 public:
22  marmoteBox(int nbDims, int* dimSize);
31  marmoteBox(int nbDims, int *lower, int* upper);
35  ~marmoteBox();
40  bool isFinite();
46  bool isZero(int* buffer);
51  void firstState(int* buffer);
55  void nextState(int *buffer);
62  void decodeState(int index, int* buf);
68  int index(int* buf);
74  void printState(FILE* out, int *buffer);
75 
76 };
77 
78 #endif // MARMOTEBOX_H
int index(int *buf)
Utility to find the number of some state.
Definition: marmoteBox.cpp:160
bool isZero(int *buffer)
Tests that a state, given by its vector representation, is zero.
Definition: marmoteBox.cpp:119
marmoteBox(int nbDims, int *dimSize)
Constructor for a marmoteBox from the arrays of sizes in each dimension. By convention, the SW corner of the box is (0,...,0). All arrays passed as parameters are copied.
Definition: marmoteBox.cpp:23
~marmoteBox()
Destructor.
Definition: marmoteBox.cpp:97
void firstState(int *buffer)
Initializes some state buffer with the first state of the set.
Definition: marmoteBox.cpp:131
void decodeState(int index, int *buf)
utility to convert a state index into a state array
Definition: marmoteBox.cpp:150
bool isFinite()
Test whether the set is finite. Boxes are finite if and only if the size in each dimension is finite...
Definition: marmoteBox.cpp:107
The mother class representing abstract sets.
Definition: marmoteSet.h:33
void printState(FILE *out, int *buffer)
Procedure for printing out a state.
Definition: marmoteBox.cpp:171
Definition: marmoteBox.h:6
void nextState(int *buffer)
Procedure to compute the state following a given state in the set order. The new state is computed in...
Definition: marmoteBox.cpp:139