Template Class AlgebraicBellmanFord

Inheritance Relationships

Base Type

Class Documentation

template<class Matrix>
class AlgebraicBellmanFord : public NetworKit::Algorithm

Implementation of the Bellman-Ford algorithm using the GraphBLAS interface.

Public Functions

inline AlgebraicBellmanFord(const Graph &graph, node source)

Construct an instance of the BellmanFord algorithm for the Graph graph and the given source node.

Parameters:
  • graph

  • source

~AlgebraicBellmanFord() = default

Default destructor

virtual void run()

Compute the shortest path from the source to all other nodes.

inline edgeweight distance(node t) const

Returns the distance from the source node to t.

Parameters:

t – Target node.

Returns:

The distance from source to target node t.

inline bool hasNegativeCycle() const
Returns:

True if there is a negative cycle present in the graph, otherwise false.