Tracore
Public Member Functions | List of all members
algo::KShortestPaths Class Reference

#include <KShortestPaths.h>

Public Member Functions

 KShortestPaths (DirectedGraph graph, Vertex source, Vertex sink)
 
MultiPredecessorMap Run (size_t max_path_count)
 

Detailed Description

Class providing a k-shortest-paths algorithm implementation.

Constructor & Destructor Documentation

algo::KShortestPaths::KShortestPaths ( DirectedGraph  graph,
Vertex  source,
Vertex  sink 
)

Initializes the k-shortest-paths algorithm for the given graph. Uses the source vertex as starting and the sink vertex as target vertex.

Parameters
graphThe graph to work with
sourceThe starting vertex
sinkThe target vertex

Member Function Documentation

MultiPredecessorMap algo::KShortestPaths::Run ( size_t  max_path_count)

Runs the algorithm to find the given number of shortest paths. The actual number of paths found is the number of entries in the MultiPredecessorMap with the sink vertex as the key.

Parameters
max_path_countThe maximum number of paths to find

The documentation for this class was generated from the following files: