27 #ifndef DOXYGEN_SHOULD_SKIP_THIS 36 for (
const auto id : graph) {
66 const ArcAddition& change)
const {
72 const ArcDeletion& change)
const {
78 const ArcReversal& change)
const {
84 const GraphChange& change)
const {
85 switch (change.type()) {
97 "edge modifications are not " 98 "supported by StructuralConstraintIndegree");
120 const GraphChange& change)
const {
134 const NodeProperty< Size >& max_indegree) {
135 for (
const auto& degree : max_indegree) {
145 degree.second = max_indegree;
153 # define GUM_CONSTRAINT_CLASS_NAME StructuralConstraintIndegree 155 # undef GUM_CONSTRAINT_CLASS_NAME void setIndegree(const NodeProperty< Size > &max_indegree)
sets the default max indegree for all the nodes in the property
bool checkModificationAlone(const ArcAddition &change) const
checks whether the constraints enable to add an arc
void setMaxIndegree(Size max_indegree, bool update_all_node=false)
resets the default max indegree and possibly updates the indegree of all nodes
bool isAlwaysInvalidAlone(const GraphChange &change) const
indicates whether a change will always violate the constraint
gum is the global namespace for all aGrUM entities
Size _Indegree__max_indegree
a default max indegree to assign for nodes without specified indegree
bool checkArcDeletionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to remove arc (x,y)
bool checkArcAdditionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to add arc (x,y)
NodeProperty< Size > _Indegree__max_parents
the max number of parents per node
void modifyGraphAlone(const ArcAddition &change)
notify the constraint of a modification of the graph
std::size_t Size
In aGrUM, hashed values are unsigned long int.
void setGraphAlone(const DiGraph &graph)
sets a new graph from which we will perform checkings
Size NodeId
Type for node ids.
#define GUM_ERROR(type, msg)
bool checkArcReversalAlone(NodeId x, NodeId y) const
checks whether the constraints enable to reverse arc (x,y)