Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::BasicPageRank Class Reference

Basic page rank calculation. More...

#include <ogdf/graphalg/PageRank.h>

Public Member Functions

 BasicPageRank ()
 
void call (const Graph &graph, const EdgeArray< double > &edgeWeight, NodeArray< double > &pageRankResult)
 main algorithm call More...
 
double dampingFactor () const
 returns the damping factor for each iteration (default is 0.85) More...
 
void initDefaultOptions ()
 sets the default options. More...
 
int maxNumIterations () const
 the maximum number of iterations (default is 1000) More...
 
void setDampingFactor (double dampingFactor)
 sets the damping factor for each iteration (default is 0.85) More...
 
void setMaxNumIterations (int maxNumIterations)
 sets the maximum number of iterations (default is 1000) More...
 
void setThreshold (double t)
 sets the threshold to t. See threshold for more information More...
 
double threshold () const
 returns the threshold/epsilon. More...
 

Private Attributes

double m_dampingFactor
 the damping factor More...
 
int m_maxNumIterations
 maximum number of iterations More...
 
double m_threshold
 the threshold More...
 

Detailed Description

Basic page rank calculation.

Definition at line 42 of file PageRank.h.

Constructor & Destructor Documentation

◆ BasicPageRank()

ogdf::BasicPageRank::BasicPageRank ( )
inline

Definition at line 44 of file PageRank.h.

Member Function Documentation

◆ call()

void ogdf::BasicPageRank::call ( const Graph graph,
const EdgeArray< double > &  edgeWeight,
NodeArray< double > &  pageRankResult 
)

main algorithm call

◆ dampingFactor()

double ogdf::BasicPageRank::dampingFactor ( ) const
inline

returns the damping factor for each iteration (default is 0.85)

Definition at line 58 of file PageRank.h.

◆ initDefaultOptions()

void ogdf::BasicPageRank::initDefaultOptions ( )
inline

sets the default options.

Definition at line 51 of file PageRank.h.

◆ maxNumIterations()

int ogdf::BasicPageRank::maxNumIterations ( ) const
inline

the maximum number of iterations (default is 1000)

Definition at line 64 of file PageRank.h.

◆ setDampingFactor()

void ogdf::BasicPageRank::setDampingFactor ( double  dampingFactor)
inline

sets the damping factor for each iteration (default is 0.85)

Definition at line 61 of file PageRank.h.

◆ setMaxNumIterations()

void ogdf::BasicPageRank::setMaxNumIterations ( int  maxNumIterations)
inline

sets the maximum number of iterations (default is 1000)

Definition at line 67 of file PageRank.h.

◆ setThreshold()

void ogdf::BasicPageRank::setThreshold ( double  t)
inline

sets the threshold to t. See threshold for more information

Definition at line 76 of file PageRank.h.

◆ threshold()

double ogdf::BasicPageRank::threshold ( ) const
inline

returns the threshold/epsilon.

After each iteration the result is compared to to the old one and in case all changes are smaller than threshold the algorithm stops. Note that the default value is 0.0 resulting in maxNumIterations usually.

Definition at line 73 of file PageRank.h.

Member Data Documentation

◆ m_dampingFactor

double ogdf::BasicPageRank::m_dampingFactor
private

the damping factor

Definition at line 80 of file PageRank.h.

◆ m_maxNumIterations

int ogdf::BasicPageRank::m_maxNumIterations
private

maximum number of iterations

Definition at line 83 of file PageRank.h.

◆ m_threshold

double ogdf::BasicPageRank::m_threshold
private

the threshold

Definition at line 86 of file PageRank.h.


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