39# ifndef TPL_TEST_CYCLE_H
40# define TPL_TEST_CYCLE_H
108template <AlephGraph GT, ArcFilter<GT> SA = Dft_Show_Arc<GT>>
131 typename GT::Arc * arc = it.get_current_arc_ne();
153 <<
"Test_For_Cycle: source node cannot be null";
164 typename GT::Arc * arc = it.get_current_arc_ne();
Exception handling system with formatted messages for Aleph-w.
#define ah_invalid_argument_if(C)
Throws std::invalid_argument if condition holds.
C++20 concepts for the protocol shared by graph algorithms.
void next_ne() noexcept
Advances the iterator to the next filtered element (noexcept version).
Test whether a cycle is reachable from a given node.
bool test_cycle(typename GT::Node *curr) const
bool test_cycle(const GT &g, typename GT::Node *s) const
Test_For_Cycle(SA arc_filter=SA())
Construct a cycle tester with optional arc filter.
bool operator()(const GT &g, typename GT::Node *src_node) const
Test whether a cycle is reachable from the given source node.
void reset_bit_nodes(int bit) const noexcept
Reset bit to zero for all the nodes of graph.
void reset_bit_arcs(int bit) const noexcept
Reset bit to zero for all the arcs of graph.
#define IS_NODE_VISITED(p, bit)
Determine whether the control bit is set or not to one.
#define ARC_BITS(p)
Return the control bits of arc p.
#define IS_ARC_VISITED(p, bit)
Determine whether the bit field is or not set to one.
#define NODE_BITS(p)
Get the control bits of a node.
Main namespace for Aleph-w library functions.
Filtered iterator of adjacent arcs of a node.
Generic graph and digraph implementations.