| Function bellmanFordAlgorithm Computes shortest paths from a single source in a directed graph. bellmanFordAlgorithm(g, source, weight, predecessor, distance) Include Headers seqan/graph_algorithms.h Parameters
g | In-parameter:A directed graph. Types: Directed Graph
source | In-parameter:A source vertex. Types: VertexDescriptor
weight | In-parameter:A weight map. Remarks: A property map with edge weights. Edge weights may be negative.
predecessor | Out-parameter:A property map. Remarks: A property map that represents predecessor relationships among vertices. It determines a shortest-paths tree.
distance | Out-parameter:A property map. Remarks: Indicates for each vertex the distance from the source.
Remarks Edge weights may be negative in the Bellman-Ford algorithm. The out parameters are only valid if the algorithm returns true. Return Values True if the graph has no negative weight cycles, false otherwise. Example Programs Bellman-Ford Algorithm See Also dijkstra, dagShortestPath SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2012/03/14 16:34:46