aGrUM  0.16.0
structuralConstraintUndiGraph.h
Go to the documentation of this file.
1 
29 #ifndef GUM_LEARNING_STRUCTURAL_CONSTRAINT_UNDIGRAPH_H
30 #define GUM_LEARNING_STRUCTURAL_CONSTRAINT_UNDIGRAPH_H
31 
32 #include <agrum/agrum.h>
33 #include <agrum/graphs/undiGraph.h>
36 
37 namespace gum {
38 
39  namespace learning {
40 
51  : public virtual StructuralConstraintEmpty {
52  public:
53  // ##########################################################################
55  // ##########################################################################
57 
60 
63 
66 
69 
72 
75 
77 
78  // ##########################################################################
80  // ##########################################################################
82 
86 
90 
92 
93  // ##########################################################################
95  // ##########################################################################
97 
99  void setGraph(Size nb_nodes);
100 
102  void setGraphAlone(const UndiGraph& graph);
103 
105 
109  void modifyGraphAlone(const EdgeAddition& change);
110 
112 
114  void modifyGraphAlone(const EdgeDeletion& change);
115 
117 
122  void modifyGraphAlone(const GraphChange& change);
123 
125 
137  bool isAlwaysInvalidAlone(const GraphChange& change) const;
138 
140 
142  bool checkEdgeAdditionAlone(NodeId x, NodeId y) const;
143 
145 
146  bool checkEdgeDeletionAlone(NodeId x, NodeId y) const;
147 
149 
152  bool checkModificationAlone(const GraphChange& change) const;
153 
155 
157  bool checkModificationAlone(const EdgeAddition& change) const;
158 
160 
161  bool checkModificationAlone(const EdgeDeletion& change) const;
162 
164 
165 #ifndef DOXYGEN_SHOULD_SKIP_THIS
166 // include the set of methods that enable the structural constraint to
167 // be standalone, i.e., that it needs not be included into a
168 // StructuralConstraintSetStatic to be used by learning algorithms
169 # define GUM_CONSTRAINT_CLASS_NAME StructuralConstraintUndiGraph
171 # undef GUM_CONSTRAINT_CLASS_NAME
172 #endif // DOXYGEN_SHOULD_SKIP_THIS
173 
174  protected:
177  };
178 
179  } /* namespace learning */
180 
181 } /* namespace gum */
182 
184 #ifndef GUM_NO_INLINE
186 #endif /* GUM_NO_INLINE */
187 
188 #endif /* GUM_LEARNING_STRUCTURAL_CONSTRAINT_UNDIGRAPH_H */
void setGraphAlone(const UndiGraph &graph)
sets a new graph from which we will perform checkings
UndiGraph _UndiGraph__graph
the UndiGraph on which we perform checks
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
bool checkModificationAlone(const GraphChange &change) const
checks whether the constraints enable to perform a graph change
bool isAlwaysInvalidAlone(const GraphChange &change) const
indicates whether a change will always violate the constraint
the base class for all structural constraints
StructuralConstraintUndiGraph & operator=(const StructuralConstraintUndiGraph &from)
copy operator
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
The class for notifying learning algorithms of edge removalsThis class is convenient to know at compi...
Definition: graphChange.h:414
The class for notifying learning algorithms of new edge additionsThis class is convenient to know at ...
Definition: graphChange.h:348
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The base class for structural constraints used by learning algorithms that learn an undirected graph ...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void setGraph(Size nb_nodes)
sets a new empty graph from which we will perform checkings
bool checkEdgeDeletionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to remove edge (x,y)
Base class for undirected graphs.
Definition: undiGraph.h:109
void modifyGraphAlone(const EdgeAddition &change)
notify the constraint of a modification of the graph
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
Size NodeId
Type for node ids.
Definition: graphElements.h:98
bool checkEdgeAdditionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to add edge (x,y)