aGrUM  0.17.2
a C++ library for (probabilistic) graphical models
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>
36 
37 namespace gum {
38 
39  namespace learning {
40 
51  public:
52  // ##########################################################################
54  // ##########################################################################
56 
59 
62 
65 
68 
71 
74 
76 
77  // ##########################################################################
79  // ##########################################################################
81 
85 
89 
91 
92  // ##########################################################################
94  // ##########################################################################
96 
98  void setGraph(Size nb_nodes);
99 
101  void setGraphAlone(const UndiGraph& graph);
102 
104 
108  void modifyGraphAlone(const EdgeAddition& change);
109 
111 
113  void modifyGraphAlone(const EdgeDeletion& change);
114 
116 
121  void modifyGraphAlone(const GraphChange& change);
122 
124 
136  bool isAlwaysInvalidAlone(const GraphChange& change) const;
137 
139 
141  bool checkEdgeAdditionAlone(NodeId x, NodeId y) const;
142 
144 
145  bool checkEdgeDeletionAlone(NodeId x, NodeId y) const;
146 
148 
151  bool checkModificationAlone(const GraphChange& change) const;
152 
154 
156  bool checkModificationAlone(const EdgeAddition& change) const;
157 
159 
160  bool checkModificationAlone(const EdgeDeletion& change) const;
161 
163 
164 #ifndef DOXYGEN_SHOULD_SKIP_THIS
165 // include the set of methods that enable the structural constraint to
166 // be standalone, i.e., that it needs not be included into a
167 // StructuralConstraintSetStatic to be used by learning algorithms
168 # define GUM_CONSTRAINT_CLASS_NAME StructuralConstraintUndiGraph
170 # undef GUM_CONSTRAINT_CLASS_NAME
171 #endif // DOXYGEN_SHOULD_SKIP_THIS
172 
173  protected:
176  };
177 
178  } /* namespace learning */
179 
180 } /* namespace gum */
181 
183 #ifndef GUM_NO_INLINE
185 #endif /* GUM_NO_INLINE */
186 
187 #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-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
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-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
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-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
The base class for structural constraints used by learning algorithms that learn an undirected graph ...
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
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)