Defined in File STSP.hpp
public NetworKit::Algorithm
(Class Algorithm)
public NetworKit::AStar
(Class AStar)
public NetworKit::AStarGeneral< Heuristic >
(Template Class AStarGeneral)
public NetworKit::BidirectionalBFS
(Class BidirectionalBFS)
public NetworKit::BidirectionalDijkstra
(Class BidirectionalDijkstra)
public NetworKit::MultiTargetBFS
(Class MultiTargetBFS)
public NetworKit::MultiTargetDijkstra
(Class MultiTargetDijkstra)
Abstract base class for source-target shortest path algorithms.
Subclassed by NetworKit::AStar, NetworKit::AStarGeneral< Heuristic >, NetworKit::BidirectionalBFS, NetworKit::BidirectionalDijkstra, NetworKit::MultiTargetBFS, NetworKit::MultiTargetDijkstra
Public Functions
Creates the STSP class for a graph G, source node source, and target node target.
G – The graph.
source – The source node.
target – The target node.
storePred – If true, the algorithm will also store the predecessors and reconstruct a shortest path from source and target.
Creates the STSP class for a graph G, source node source, and multiple target nodes.
G – The graph.
source – The source node.
targetsFirst, targetsLast – Range of target nodes.
Returns a shortest path from the source node to the target node (without including them). Note: the shortest path can be constructed only if the algorithm is executed with storePred set to true.
A shortest path from the source to target.
Returns the predecessor nodes from the target to the source. Note: predecessors are stored only if the algorithm is executed with storePred set to true.
The list of predecessors from target to source.
If the target is a single node: returns the distance from the source node to the target node.
The distance from source to the target node.
In case of multiple target nodes: returns the distance from the source node to the target nodes.
Distances from the source to the target nodes.
Sets the source node.
newSource – The new source node.
Sets the target node.
newTarget – The new target node.
Sets the target nodes.
targetsFirst, targetsLast – Range of target nodes.
Returns the <node, index> map from target nodes to their index in the vector returned by STSP::getDistances().
Map from target nodes to their index in the vector returned by STSP::getDistances().