Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PageRank.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 
36 namespace ogdf {
37 
39 
43 public:
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 
78 private:
81 
84 
86  double m_threshold;
87 };
88 
89 }
ogdf::BasicPageRank::initDefaultOptions
void initDefaultOptions()
sets the default options.
Definition: PageRank.h:51
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::BasicPageRank::BasicPageRank
BasicPageRank()
Definition: PageRank.h:44
Graph.h
Includes declaration of graph class.
ogdf::BasicPageRank::setThreshold
void setThreshold(double t)
sets the threshold to t. See threshold for more information
Definition: PageRank.h:76
ogdf::BasicPageRank::m_threshold
double m_threshold
the threshold
Definition: PageRank.h:86
ogdf::BasicPageRank::m_maxNumIterations
int m_maxNumIterations
maximum number of iterations
Definition: PageRank.h:83
ogdf::BasicPageRank::threshold
double threshold() const
returns the threshold/epsilon.
Definition: PageRank.h:73
ogdf::BasicPageRank::call
void call(const Graph &graph, const EdgeArray< double > &edgeWeight, NodeArray< double > &pageRankResult)
main algorithm call
ogdf::BasicPageRank::maxNumIterations
int maxNumIterations() const
the maximum number of iterations (default is 1000)
Definition: PageRank.h:64
ogdf::BasicPageRank::setDampingFactor
void setDampingFactor(double dampingFactor)
sets the damping factor for each iteration (default is 0.85)
Definition: PageRank.h:61
ogdf::BasicPageRank::dampingFactor
double dampingFactor() const
returns the damping factor for each iteration (default is 0.85)
Definition: PageRank.h:58
ogdf::BasicPageRank
Basic page rank calculation.
Definition: PageRank.h:42
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::BasicPageRank::setMaxNumIterations
void setMaxNumIterations(int maxNumIterations)
sets the maximum number of iterations (default is 1000)
Definition: PageRank.h:67
ogdf::BasicPageRank::m_dampingFactor
double m_dampingFactor
the damping factor
Definition: PageRank.h:80
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716