18 # ifndef SEARCH_MEMORY_LEAKS_ENABLED
19 # error SEARCH NOT ENABLED
21 # define new DEBUG_NEW
23 static char THIS_FILE[] = __FILE__;
33 class less_dist :
public binary_function<node, node, bool>
65 return (*
dist)[n1] < (*dist)[n2];
125 bool source_found =
false;
128 for (node_it = G.
nodes_begin(); node_it != nodes_end; ++node_it)
143 for(edge_it = G.
edges_begin(); edge_it != edges_end; ++edge_it)
145 if (
weight[*edge_it] < 0.0)
164 while (!node_heap.is_empty())
170 node cur_node = node_heap.top();
176 mark[cur_node] =
white;
186 adj_edge_it != adj_edges_end;
190 if (mark[op_node] ==
black)
192 mark[op_node] =
grey;
194 node_heap.push(op_node);
201 pred[op_node] = *adj_edge_it;
204 else if (mark[op_node] ==
grey)
209 node_heap.changeKey(op_node);
216 pred[op_node] = *adj_edge_it;
269 return pred[
n].opposite(n);
361 for (node_it = G.
nodes_begin(); node_it != nodes_end; ++node_it)
372 if ((dest ==
s) || (!
reached(dest)))
378 while (cur_node !=
node())
388 if ((dest ==
s) || (!
reached(dest)))
395 while (cur_edge !=
edge())