27 # ifndef TPL_TEST_CYCLE_H 28 # define TPL_TEST_CYCLE_H 30 # include <tpl_graph.H> 45 template <
class GT,
class SA = Dft_Show_Arc<GT>>
48 typename GT::Node * src =
nullptr;
51 bool test_cycle(
typename GT::Node * curr)
59 NODE_BITS(curr).set_bit(Test_Cycle,
true);
64 typename GT::Arc * arc = it.get_current_arc_ne();
68 ARC_BITS(arc).set_bit(Test_Cycle,
true);
70 if (test_cycle(it.get_tgt_node()))
79 bool test_cycle(GT & g,
typename GT::Node * s)
83 g.reset_bit_nodes(Test_Cycle);
84 g.reset_bit_arcs(Test_Cycle);
89 typename GT::Arc * arc = it.get_current_arc_ne();
93 ARC_BITS(arc).set_bit(Test_Cycle,
true);
95 if (test_cycle(it.get_tgt_node()))
119 return this->test_cycle(g, src);
126 # endif // TPL_TEST_CYCLE_H #define IS_NODE_VISITED(p, bit)
Definition: aleph-graph.H:327
#define IS_ARC_VISITED(p, bit)
Definition: aleph-graph.H:360
#define NODE_BITS(p)
Definition: aleph-graph.H:305
#define ARC_BITS(p)
Definition: aleph-graph.H:351
Definition: tpl_test_cycle.H:46
Definition: tpl_graph.H:1177
bool operator()(GT &g, typename GT::Node *src)
Definition: tpl_test_cycle.H:117