 DistanceWeightCombine distance_weight_combine,
   DistanceInfinity distance_infinity, DistanceZero distance_zero);
</PRE>

<P>
This algorithm&nbsp;[<A HREF="bibliography.html#dijkstra59">10</A>,<A
HREF="bibliography.html#clr90">8</A>] solves the single-source
shortest-paths problem on a weighted, directed or undirected graph for
the case where all edge weights are nonnegative.  Use the Bellman-Ford
algorithm for the case when some edge weights are negative.  Use
breadth-first search instead of Dijkstra's a