Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PageRank.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35
36namespace ogdf {
37
39
43public:
45
47 void call(const Graph& graph, const EdgeArray<double>& edgeWeight,
48 NodeArray<double>& pageRankResult);
49
52 m_dampingFactor = 0.85;
53 m_maxNumIterations = 1000;
54 m_threshold = 0.0;
55 }
56
58 double dampingFactor() const { return m_dampingFactor; }
59
62
64 int maxNumIterations() const { return m_maxNumIterations; }
65
68
73 double threshold() const { return m_threshold; }
74
76 void setThreshold(double t) { m_threshold = t; }
77
78private:
81
84
87};
88
89}
Includes declaration of graph class.
Basic page rank calculation.
Definition PageRank.h:42
void call(const Graph &graph, const EdgeArray< double > &edgeWeight, NodeArray< double > &pageRankResult)
main algorithm call
void setDampingFactor(double dampingFactor)
sets the damping factor for each iteration (default is 0.85)
Definition PageRank.h:61
void setMaxNumIterations(int maxNumIterations)
sets the maximum number of iterations (default is 1000)
Definition PageRank.h:67
void setThreshold(double t)
sets the threshold to t. See threshold for more information
Definition PageRank.h:76
double dampingFactor() const
returns the damping factor for each iteration (default is 0.85)
Definition PageRank.h:58
int m_maxNumIterations
maximum number of iterations
Definition PageRank.h:83
double threshold() const
returns the threshold/epsilon.
Definition PageRank.h:73
int maxNumIterations() const
the maximum number of iterations (default is 1000)
Definition PageRank.h:64
void initDefaultOptions()
sets the default options.
Definition PageRank.h:51
double m_threshold
the threshold
Definition PageRank.h:86
double m_dampingFactor
the damping factor
Definition PageRank.h:80
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
The namespace for all OGDF objects.