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
36
37namespace ogdf {
38
40
44public:
46
48 void call(const Graph& graph, const EdgeArray<double>& edgeWeight,
50
53 m_dampingFactor = 0.85;
54 m_maxNumIterations = 1000;
55 m_threshold = 0.0;
56 }
57
59 double dampingFactor() const { return m_dampingFactor; }
60
63
65 int maxNumIterations() const { return m_maxNumIterations; }
66
69
74 double threshold() const { return m_threshold; }
75
77 void setThreshold(double t) { m_threshold = t; }
78
79private:
82
85
88};
89
90}
Declaration and implementation of EdgeArray class.
Declaration and implementation of NodeArray class.
Basic page rank calculation.
Definition PageRank.h:43
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:62
void setMaxNumIterations(int maxNumIterations)
sets the maximum number of iterations (default is 1000)
Definition PageRank.h:68
void setThreshold(double t)
sets the threshold to t. See threshold for more information
Definition PageRank.h:77
double dampingFactor() const
returns the damping factor for each iteration (default is 0.85)
Definition PageRank.h:59
int m_maxNumIterations
maximum number of iterations
Definition PageRank.h:84
double threshold() const
returns the threshold/epsilon.
Definition PageRank.h:74
int maxNumIterations() const
the maximum number of iterations (default is 1000)
Definition PageRank.h:65
void initDefaultOptions()
sets the default options.
Definition PageRank.h:52
double m_threshold
the threshold
Definition PageRank.h:87
double m_dampingFactor
the damping factor
Definition PageRank.h:81
Dynamic arrays indexed with edges.
Definition EdgeArray.h:125
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.