Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
marmoteInterval.h
1 /* Marmote is free software: you can redistribute it and/or modify
2 it under the terms of the GNU General Public License as published by
3 the Free Software Foundation, either version 3 of the License, or
4 (at your option) any later version.
5 
6 Marmote is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 GNU General Public License for more details.
10 
11 You should have received a copy of the GNU General Public License
12 along with Marmote. If not, see <http://www.gnu.org/licenses/>.
13 
14 Copyright 2015 Alain Jean-Marie, Jean-Michel Fourneau, Jean-Marc Vincent, Issam Rabhi */
15 
16 /* marmoteInterval.h ---
17  *
18  * Author: Alain Jean-Marie
19  */
20 
21 /* Commentary:
22  *
23  */
24 
25 /* Change log:
26  *
27  */
28 
29 
30 #ifndef MARMOTEINTERVAL_H
31 #define MARMOTEINTERVAL_H
32 #include "marmoteSet.h"
33 
39 
40  protected:
41  int _min;
42  int _max;
44  public:
52  marmoteInterval( int min, int max );
53 
54  public:
60  bool isFinite() { return true; };
61  bool isZero(int* buffer);
66  void firstState(int* buffer);
70  void nextState(int *buffer);
74  void decodeState(int index, int* buf);
78  int index(int* buf);
82  void printState(FILE* out, int *buffer);
83 
84  public:
89  void enumerate();
90 
91 };
92 
93 #endif // MARMOTEINTERVAL_H
void enumerate()
Enumeration procedure.
marmoteInterval(int min, int max)
Definition: marmoteInterval.cpp:20
bool isFinite()
Test if the set is finite. These sets always are.
Definition: marmoteInterval.h:60
void printState(FILE *out, int *buffer)
Definition: marmoteInterval.cpp:79
int index(int *buf)
Definition: marmoteInterval.cpp:71
void decodeState(int index, int *buf)
Definition: marmoteInterval.cpp:65
void firstState(int *buffer)
Initializes some state buffer with the first state of the set.
Definition: marmoteInterval.cpp:51
int _min
Definition: marmoteInterval.h:26
The mother class representing abstract sets.
Definition: marmoteSet.h:33
int _max
Definition: marmoteInterval.h:27
void nextState(int *buffer)
Procedure to compute the state following a given state in the set order. The new state is computed in...
Definition: marmoteInterval.cpp:57
The class describing a finite integer interval.
Definition: marmoteInterval.h:23