Template Class AStarGeneral

Inheritance Relationships

Base Type

Class Documentation

template<typename Heuristic>
class AStarGeneral : public NetworKit::STSP

AStar path-finding algoritm with general Heuristic function.

Public Functions

inline AStarGeneral(const Graph &G, Heuristic heu, node source, node target, bool storePred = true)

Creates the AStarGeneral class for the graph G, the source node source, and the target node target using a template parameter as heuristic function.

Parameters:
  • G – The graph.

  • heu – Heuristic function that takes a node as input and returns a lower bound of the distance of that node to the target node.

  • 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.

inline virtual void run() override

The generic run method which calls runImpl() and takes care of setting hasRun to the appropriate value.