35 #ifndef GUM_DAG_CYCLE_DETECTOR_H 36 #define GUM_DAG_CYCLE_DETECTOR_H 73 virtual ~
Change() noexcept;
89 NodeId tail()
const noexcept;
92 NodeId head()
const noexcept;
329 Size multiplier)
const;
334 Size multiplier)
const;
341 const NodeSet& extrmities)
const;
346 #ifndef GUM_NO_INLINE 348 #endif // GUM_NOINLINE 350 #endif // GUM_DAG_CYCLE_DETECTOR_H A class for detecting directed cycles in DAGs when trying to apply many changes to the graph...
~DAGCycleDetector()
destructor
DiGraph __dag
the initial dag from which modifications are applied
the base class indicating the possible changes
void eraseArc(NodeId x, NodeId y)
removes an arc from the current DAG
void __addWeightedSet(NodeProperty< Size > &nodeset, const NodeProperty< Size > &set_to_add, Size multiplier) const
adds a weighted nodeset to another (weights are added)
void addArc(NodeId x, NodeId y)
adds a new arc to the current DAG
void __delWeightedSet(NodeProperty< Size > &nodeset, const NodeProperty< Size > &set_to_del, Size multiplier) const
removes a weighted nodeset from another (weights are subtracted)
void __restrictWeightedSet(NodeProperty< Size > &result_set, const NodeProperty< Size > &set_to_restrict, const NodeSet &extrmities) const
put into a weighted nodeset the nodes of another weighted set that belong to a set of arc extremities...
ChangeType __type
the type of modification
the class to indicate that we wish to reverse an arc
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The class for generic Hash Tables.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
bool hasCycleFromModifications(const std::vector< Change > &modifs) const
indicates whether a set of modifications would create a cycle
DAGCycleDetector & operator=(const DAGCycleDetector &from)
copy operator
void setDAG(const DAG &dag)
sets the initial DAG from which changes shall be applied
the class to indicate that we wish to add a new arc
Base class for all oriented graphs.
NodeId __head
the head of the arc to be modified
bool operator!=(const DAGCycleDetector &from) const
check the inequality between two DAGCycleDetectors
bool hasCycleFromAddition(NodeId x, NodeId y) const noexcept
indicates whether an arc addition would create a cycle
NodeId __tail
the tail of the arc to be modified
NodeProperty< NodeProperty< Size > > __descendants
the set of descendants of each node in the dag
NodeProperty< NodeProperty< Size > > __ancestors
the set of ancestors of each node in the dag
bool hasCycleFromReversal(NodeId x, NodeId y) const noexcept
indicates wether an arc reversal would create a cycle
bool hasCycleFromDeletion(NodeId x, NodeId y) const noexcept
indicates whether an arc deletion would create a cycle
std::size_t Size
In aGrUM, hashed values are unsigned long int.
DAGCycleDetector() noexcept
default constructor
the class to indicate that we wish to remove an arc
bool operator==(const DAGCycleDetector &from) const
check the equality between two DAGCycleDetectors
Size NodeId
Type for node ids.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void reverseArc(NodeId x, NodeId y)
reverses an arc from the DAG