All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
NetworKit::AlgebraicPageRank< Matrix > Class Template Reference

Implementation of PageRank using the GraphBLAS interface. More...

#include <AlgebraicPageRank.h>

Public Member Functions

 AlgebraicPageRank (const Graph &graph, const double damp=0.85, const double tol=1e-8)
 Constructs an instance of AlgebraicPageRank for the given graph. More...
 
void run () override
 The generic run method which calls runImpl() and takes care of setting to the appropriate value. More...
 
std::vector< double > scores (bool moveOut=false)
 Get a vector containing the betweenness score for each node in the graph. More...
 
std::vector< std::pair< node,
double > > 
ranking ()
 Get a vector of pairs sorted into descending order. More...
 
double score (node v)
 Get the betweenness score of node v calculated by run(). More...
 
double maximum ()
 Get the theoretical maximum of centrality score in the given graph. More...
 
- Public Member Functions inherited from NetworKit::Algorithm
 Algorithm ()
 Constructor to the algorithm base class. More...
 
virtual ~Algorithm ()=default
 Virtual default destructor. More...
 
bool hasFinished () const
 Indicates whether an algorithm has completed computation or not. More...
 
void assureFinished () const
 Assure that the algorithm has been run, throws a std::runtime_error otherwise. More...
 
virtual std::string toString () const
 Returns a string with the algorithm's name and its parameters, if there are any. More...
 
virtual bool isParallel () const
 

Additional Inherited Members

- Protected Attributes inherited from NetworKit::Algorithm
bool hasRun
 A boolean variable indicating whether an algorithm has finished its computation or not. More...
 

Detailed Description

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

Implementation of PageRank using the GraphBLAS interface.

Constructor & Destructor Documentation

template<class Matrix >
NetworKit::AlgebraicPageRank< Matrix >::AlgebraicPageRank ( const Graph graph,
const double  damp = 0.85,
const double  tol = 1e-8 
)
inline

Constructs an instance of AlgebraicPageRank for the given graph.

Page rank uses the damping factor damp and the tolerance tol.

Parameters
graph
damp
tol

Member Function Documentation

template<class Matrix >
double NetworKit::AlgebraicPageRank< Matrix >::maximum ( )
inline

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

Returns
The maximum centrality score.
template<class Matrix >
std::vector< std::pair< node, double > > NetworKit::AlgebraicPageRank< Matrix >::ranking ( )

Get a vector of pairs sorted into descending order.

Each pair contains a node and the corresponding score calculated by A vector of pairs.

template<class Matrix >
void NetworKit::AlgebraicPageRank< Matrix >::run ( )
overridevirtual

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

Implements NetworKit::Algorithm.

template<class Matrix >
double NetworKit::AlgebraicPageRank< Matrix >::score ( node  v)

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

Parameters
vA node.
Returns
The betweenness score of node v.
template<class Matrix >
std::vector< double > NetworKit::AlgebraicPageRank< Matrix >::scores ( bool  moveOut = false)

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

Parameters
moveOutReturn the actual internal data instead of a copy. Resets the hasRun-state. Default: false.
Returns
The betweenness scores calculated by run().

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