Template Class AlgebraicPageRank

Inheritance Relationships

Base Type

Class Documentation

template<class Matrix>
class AlgebraicPageRank : public NetworKit::Centrality

Implementation of PageRank using the GraphBLAS interface.

Public Functions

inline AlgebraicPageRank(const Graph &graph, const double damp = 0.85, const double tol = 1e-8)

Constructs an instance of AlgebraicPageRank for the given graph. Page rank uses the damping factor damp and the tolerance tol.

Parameters:
  • graph

  • damp

  • tol

virtual void run() override

Computes centrality scores on the graph passed in constructor.

virtual const std::vector<double> &scores() const override

Get a vector containing the betweenness score for each node in the graph.

Returns:

The betweenness scores calculated by run().

virtual std::vector<std::pair<node, double>> ranking() override

Get a vector of pairs sorted into descending order. Each pair contains a node and the corresponding score calculated by run().

Returns:

A vector of pairs.

virtual double score(node v) override

Get the betweenness score of node v calculated by run().

Parameters:

v – A node.

Returns:

The betweenness score of node v.

inline virtual double maximum() override

Get the theoretical maximum of centrality score in the given graph.

Returns:

The maximum centrality score.