Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

PageRank.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/NodeArray.h>
35 #include <ogdf/basic/EdgeArray.h>
36 
37 namespace ogdf {
38 
40 
44 {
45 public:
47  {
49  }
50 
52  void call(
53  const Graph& graph,
54  const EdgeArray<double>& edgeWeight,
55  NodeArray<double>& pageRankResult);
56 
59  {
60  m_dampingFactor = 0.85;
61  m_maxNumIterations = 1000;
62  m_threshold = 0.0;
63  }
64 
66  double dampingFactor() const
67  {
68  return m_dampingFactor;
69  }
70 
73  {
75  }
76 
78  int maxNumIterations() const
79  {
80  return m_maxNumIterations;
81  }
82 
85  {
87  }
88 
93  double threshold() const
94  {
95  return m_threshold;
96  }
97 
98 
100  void setThreshold(double t)
101  {
102  m_threshold = t;
103  }
104 
105 private:
108 
111 
113  double m_threshold;
114 };
115 
116 } // end of namespace ogdf
void setMaxNumIterations(int maxNumIterations)
sets the maximum number of iterations (default is 1000)
Definition: PageRank.h:84
double m_threshold
the threshold
Definition: PageRank.h:113
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
Basic page rank calculation.
Definition: PageRank.h:43
double dampingFactor() const
returns the damping factor for each iteration (default is 0.85)
Definition: PageRank.h:66
int m_maxNumIterations
maximum number of iterations
Definition: PageRank.h:110
void setThreshold(double t)
sets the threshold to t. See threshold for more information
Definition: PageRank.h:100
Declaration and implementation of EdgeArray class.
int maxNumIterations() const
the maximum number of iterations (default is 1000)
Definition: PageRank.h:78
Declaration and implementation of NodeArray class.
void setDampingFactor(double dampingFactor)
sets the damping factor for each iteration (default is 0.85)
Definition: PageRank.h:72
double threshold() const
returns the threshold/epsilon.
Definition: PageRank.h:93
void initDefaultOptions()
sets the default options.
Definition: PageRank.h:58
double m_dampingFactor
the damping factor
Definition: PageRank.h:107
The namespace for all OGDF objects.
void call(const Graph &graph, const EdgeArray< double > &edgeWeight, NodeArray< double > &pageRankResult)
main algorithm call