27 # ifndef HAMILTONIAN_H 28 # define HAMILTONIAN_H 30 # include <tpl_graph.H> 60 bool test_graph(GT & g)
62 assert(not g.is_digraph());
64 const size_t & n = g.get_num_nodes();
68 typename GT::Node * src = i.get_curr_ne();
69 const size_t & nsrc = g.get_num_arcs(src);
74 if (nsrc + g.get_num_arcs(j.get_curr_ne()) < n)
81 bool test_digraph(GT & g)
83 assert(g.is_digraph());
85 g.reset_counter_nodes();
91 const size_t & n = g.get_num_nodes();
95 typename GT::Node * src = i.get_curr_ne();
99 typename GT::Node * tgt = j.get_curr_ne();
108 bool terminate =
true;
111 if (src == it.get_tgt_node_ne())
135 bool operator () (GT & g)
138 return test_digraph(g);
140 return test_graph(g);
148 # endif // HAMILTONIAN_H Definition: hamiltonian.H:55
Definition: tpl_graph.H:1225
#define NODE_COUNTER(p)
Definition: aleph-graph.H:311
Definition: tpl_graph.H:1257
Definition: tpl_graph.H:1063
Definition: tpl_graph.H:1270
Definition: tpl_graph.H:1177