Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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
 
double dampingFactor () const
 returns the damping factor for each iteration (default is 0.85)
 
void initDefaultOptions ()
 sets the default options.
 
int maxNumIterations () const
 the maximum number of iterations (default is 1000)
 
void setDampingFactor (double dampingFactor)
 sets the damping factor for each iteration (default is 0.85)
 
void setMaxNumIterations (int maxNumIterations)
 sets the maximum number of iterations (default is 1000)
 
void setThreshold (double t)
 sets the threshold to t. See threshold for more information
 
double threshold () const
 returns the threshold/epsilon.
 

Private Attributes

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

Detailed Description

Basic page rank calculation.

Definition at line 43 of file PageRank.h.

Constructor & Destructor Documentation

◆ BasicPageRank()

ogdf::BasicPageRank::BasicPageRank ( )
inline

Definition at line 45 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 59 of file PageRank.h.

◆ initDefaultOptions()

void ogdf::BasicPageRank::initDefaultOptions ( )
inline

sets the default options.

Definition at line 52 of file PageRank.h.

◆ maxNumIterations()

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

the maximum number of iterations (default is 1000)

Definition at line 65 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 62 of file PageRank.h.

◆ setMaxNumIterations()

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

sets the maximum number of iterations (default is 1000)

Definition at line 68 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 77 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 74 of file PageRank.h.

Member Data Documentation

◆ m_dampingFactor

double ogdf::BasicPageRank::m_dampingFactor
private

the damping factor

Definition at line 81 of file PageRank.h.

◆ m_maxNumIterations

int ogdf::BasicPageRank::m_maxNumIterations
private

maximum number of iterations

Definition at line 84 of file PageRank.h.

◆ m_threshold

double ogdf::BasicPageRank::m_threshold
private

the threshold

Definition at line 87 of file PageRank.h.


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