Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
cost.h
Go to the documentation of this file.
1 
2 /* Copyright(C) (2002) (ID - IMAG) <Florent.Morata@imag.fr> */
3 
4 /*
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19 
20 
28 #ifndef _COST_H_
29 #define _COST_H_
30 
31 #include <vector>
32 #include <algorithm>
33 #include <string>
34 #include <fstream>
35 
37 using namespace std;
38 
39 
43 class Cost{
44 
45 public:
46  Cost();
47  ~Cost() {}
48 
49 private:
51  vector<int> Class;
53  vector<int> Class_next;
55  vector<int> Cout;
56 
57 public:
58  void init();
59  void init_state(const int nb);
60  void clear();
61  int value() const;
62  int value(const int i) const;
63  int value_next() const;
64  int value_next(const int i) const;
65  void swap();
66  bool test();
67  bool test_next();
68  void free_cl();
69  void change(const int i,const int j);
70  void mk_cost(int* cost, int sz);
71  int nb_cl();
72 };
73 
74 
75 
76 #include "cost.inl"
77 
78 
79 #endif
80 
Utilization of the Standard Template Library.
Simulation data for CFTP algorithm.
Definition: cost.h:43
Inline methods of Cost file.