aGrUM  0.14.2
statesChecker.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES and Pierre-Henri WUILLEMIN *
3  * {prenom.nom}_at_lip6.fr *
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 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 *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
27 // =========================================================================
28 #ifndef GUM_STATES_CHECKER_H
29 #define GUM_STATES_CHECKER_H
30 // =========================================================================
31 // =========================================================================
32 #include <agrum/core/sequence.h>
34 // =========================================================================
35 
36 namespace gum {
37 
38 
46  class StatesChecker {
47  public:
48  // ==========================================================================
50  // ==========================================================================
52 
56  StatesChecker();
57 
62 
64 
65  // ==========================================================================
67  // ==========================================================================
69 
70  bool checkState(const Instantiation& state) { return __checker->get(state); }
71 
72  void addState(const Instantiation&);
73 
75 
76  void reset(const Instantiation&);
77 
79 
80  private:
81  void __insertState(const Instantiation&, NodeId, Idx);
82 
84 
87 
89  };
90 } /* namespace gum */
91 
92 #endif // GUM_STATES_CHECKER_H
bool checkState(const Instantiation &state)
Definition: statesChecker.h:70
Header file of gum::Sequence, a class for storing (ordered) sequences of objects. ...
~StatesChecker()
Default destructor.
Set< Instantiation *> __visitedStates
Definition: statesChecker.h:88
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
Representation of a setA Set is a structure that contains arbitrary elements.
Definition: set.h:162
void addState(const Instantiation &)
StatesChecker()
Default constructor.
Headers of MultiDimFunctionGraph.
Class for assigning/browsing values to tuples of discrete variables.
Definition: instantiation.h:80
void reset(const Instantiation &)
Size Idx
Type for indexes.
Definition: types.h:50
<agrum/FMDP/simulation/statesChecker.h>
Definition: statesChecker.h:46
virtual GUM_SCALAR get(const Instantiation &i) const
Returns the value pointed by i.
Size NodeId
Type for node ids.
Definition: graphElements.h:97
MultiDimFunctionGraph< bool > * __checker
Definition: statesChecker.h:85
void __insertState(const Instantiation &, NodeId, Idx)