19 # ifndef SEARCH_MEMORY_LEAKS_ENABLED
20 # error SEARCH NOT ENABLED
22 # define new DEBUG_NEW
24 static char THIS_FILE[] = __FILE__;
37 return os <<
"[" << n.
id() <<
"]";
39 return os <<
"[ UNDEF ]";
155 return b.
level(last_node);
177 node::adj_edges_iterator::adj_edges_iterator()
181 node::adj_edges_iterator::adj_edges_iterator(
node n,
bool start)
201 if (akt_edge[0] == last_edge[0])
207 inout = directed ? 0 : 1;
217 return i.akt_edge[i.inout] == akt_edge[inout];
223 return i.akt_edge[i.inout] != akt_edge[inout];
235 if (akt_edge[0] == last_edge[0])
240 if (akt_edge[1] == last_edge[1])
243 akt_edge[0] = begin_edge[0];
244 akt_edge[1] = begin_edge[1];
245 if (begin_edge[0] == last_edge[0])
264 if (!directed && inout == 1 && akt_edge[1] == begin_edge[1])
279 return *akt_edge[inout];
282 const edge* node::adj_edges_iterator::operator->()
const
284 return akt_edge[inout].operator->();
291 node::inout_edges_iterator::inout_edges_iterator()
295 node::inout_edges_iterator::inout_edges_iterator(
node n,
bool start)
307 if (akt_edge[0] == last_edge)
321 return i.akt_edge[i.inout] == akt_edge[inout];
327 return i.akt_edge[i.inout] != akt_edge[inout];
333 if ((akt_edge[inout] == last_edge) && (inout==0))
347 if (inout == 1 && (akt_edge[1] == begin_edge))
362 return *akt_edge[inout];
365 const edge* node::inout_edges_iterator::operator->()
const
367 return akt_edge[inout].operator->();
374 node::adj_nodes_iterator::adj_nodes_iterator()
378 node::adj_nodes_iterator::adj_nodes_iterator(
const node& n,
bool start)
390 return i.akt_edge == akt_edge;
396 return i.akt_edge != akt_edge;
427 return int_node.opposite(*akt_edge);
430 const node* node::adj_nodes_iterator::operator->()
const
432 return &(int_node.opposite(*akt_edge));