30 #ifndef DOXYGEN_SHOULD_SKIP_THIS 39 for (
const auto id : graph) {
69 const ArcAddition& change)
const {
75 const ArcDeletion& change)
const {
81 const ArcReversal& change)
const {
87 const GraphChange& change)
const {
88 switch (change.type()) {
100 "edge modifications are not " 101 "supported by StructuralConstraintIndegree");
123 const GraphChange& change)
const {
137 const NodeProperty< Size >& max_indegree) {
138 for (
const auto& degree : max_indegree) {
148 degree.second = max_indegree;
156 # define GUM_CONSTRAINT_CLASS_NAME StructuralConstraintIndegree 158 # 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
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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)