aGrUM  0.16.0
structuralConstraintSliceOrder.h
Go to the documentation of this file.
1 
39 #ifndef GUM_LEARNING_STRUCTURAL_CONSTRAINT_SLICE_ORDER_H
40 #define GUM_LEARNING_STRUCTURAL_CONSTRAINT_SLICE_ORDER_H
41 
42 #include <agrum/agrum.h>
45 
46 namespace gum {
47 
48  namespace learning {
49 
68  : protected virtual StructuralConstraintSetStatic<
69  StructuralConstraintDiGraph > {
70  public:
71  // ##########################################################################
73  // ##########################################################################
75 
78 
80 
82 
85  const NodeProperty< NodeId >& order);
86 
89 
92 
95 
97 
98  // ##########################################################################
100  // ##########################################################################
102 
106 
110 
112 
113  // ##########################################################################
115  // ##########################################################################
117 
119  void setSliceOrder(const NodeProperty< NodeId >& slice);
120 
122  const NodeProperty< NodeId >& sliceOrder() const;
123 
125  void addNode(NodeId node, NodeId slice);
126 
129  void setDefaultSlice(NodeId slice);
130 
132  void setGraphAlone(const DiGraph& graph);
133 
135 
141  void modifyGraphAlone(const ArcAddition& change);
142 
144 
146  void modifyGraphAlone(const ArcDeletion& change);
147 
149 
155  void modifyGraphAlone(const ArcReversal& change);
156 
158 
164  void modifyGraphAlone(const GraphChange& change);
165 
167 
180  bool isAlwaysInvalidAlone(const GraphChange& change) const;
181 
183 
186  bool checkArcAdditionAlone(NodeId x, NodeId y) const;
187 
189 
190  bool checkArcDeletionAlone(NodeId x, NodeId y) const;
191 
193 
195  bool checkArcReversalAlone(NodeId x, NodeId y) const;
196 
198 
201  bool checkModificationAlone(const ArcAddition& change) const;
202 
204 
205  bool checkModificationAlone(const ArcDeletion& change) const;
206 
208 
210  bool checkModificationAlone(const ArcReversal& change) const;
211 
213 
219  bool checkModificationAlone(const GraphChange& change) const;
220 
222 
223 #ifndef DOXYGEN_SHOULD_SKIP_THIS
224 // include the set of methods that enable the structural constraint to
225 // be standalone, i.e., that it needs not be included into a
226 // StructuralConstraintSetStatic to be used by learning algorithms
227 # define GUM_CONSTRAINT_CLASS_NAME StructuralConstraintSliceOrder
229 # undef GUM_CONSTRAINT_CLASS_NAME
230 #endif // DOXYGEN_SHOULD_SKIP_THIS
231 
232  protected:
235  };
236 
237  } /* namespace learning */
238 
239 } /* namespace gum */
240 
242 #ifndef GUM_NO_INLINE
244 #endif /* GUM_NO_INLINE */
245 
246 #endif /* GUM_LEARNING_STRUCTURAL_CONSTRAINT_SLICE_ORDER_H */
bool checkArcAdditionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to add arc (x,y)
bool checkArcReversalAlone(NodeId x, NodeId y) const
checks whether the constraints enable to reverse arc (x,y)
bool checkArcDeletionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to remove arc (x,y)
The class for notifying learning algorithms of new arc additionsThis class is convenient to know at c...
Definition: graphChange.h:150
void setGraphAlone(const DiGraph &graph)
sets a new graph from which we will perform checkings
void setDefaultSlice(NodeId slice)
assign a given slice to all the nodes specified in the partial order
The class for notifying learning algorithms of arc removalsThis class is convenient to know at compil...
Definition: graphChange.h:216
StructuralConstraintSliceOrder & operator=(const StructuralConstraintSliceOrder &from)
copy operator
NodeProperty< NodeId > _SliceOrder__order
slices to which belong the nodes
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 generic Hash Tables.
Definition: hashTable.h:679
bool checkModificationAlone(const ArcAddition &change) const
checks whether the constraints enable to add an arc
void setSliceOrder(const NodeProperty< NodeId > &slice)
sets the time slices of all the nodes in the property
const NodeProperty< NodeId > & sliceOrder() const
returns the current slice order
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
the "meta-programming" class for storing structural constraintsIn aGrUM, there are two ways to store ...
Base class for all oriented graphs.
Definition: diGraph.h:111
bool isAlwaysInvalidAlone(const GraphChange &change) const
indicates whether a change will always violate the constraint
void modifyGraphAlone(const ArcAddition &change)
notify the constraint of a modification of the graph
The class for notifying learning algorithms of arc reversalsThis class is convenient to know at compi...
Definition: graphChange.h:282
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size NodeId
Type for node ids.
Definition: graphElements.h:98
void addNode(NodeId node, NodeId slice)
adds a new node in the slice order
the structural constraint imposing a partial order over nodes