All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Sparsifiers.h
Go to the documentation of this file.
1 /*
2  * Sparsifiers.h
3  *
4  * Created on: 23.07.2014
5  * Author: Gerd Lindner
6  */
7 
8 #ifndef SPARSIFIERS_H_
9 #define SPARSIFIERS_H_
10 
11 #include "../graph/Graph.h"
12 
13 namespace NetworKit {
14 
23 class Sparsifier {
24 
25 public:
26 
27  Sparsifier(const Graph& inputGraph);
28 
29  virtual ~Sparsifier() = default;
30 
34  virtual void run() = 0;
35 
36  Graph getGraph();
37 
38 protected:
39  const Graph& inputGraph;
41  bool hasOutput;
42 
43 };
44 
45 
51 
52 public:
58  SimmelianSparsifierNonParametric(const Graph& graph, double threshold);
59 
60  virtual void run() override;
61 
62 private:
63  double threshold;
64 
65 };
66 
72 
73 public:
81  SimmelianSparsifierParametric(const Graph& graph, int maxRank, int minOverlap);
82 
83  virtual void run() override;
84 
85 private:
86  int maxRank;
87  int minOverlap;
88 
89 };
90 
95 
96 public:
102  MultiscaleSparsifier(const Graph& graph, double alpha);
103 
104  virtual void run() override;
105 
106 private:
107  double alpha;
108 
109 };
110 
115 
116 public:
122  LocalSimilaritySparsifier(const Graph& graph, double e);
123 
124  virtual void run() override;
125 
126 private:
127  double e;
128 
129 };
130 
135 
136 public:
142  SimmelianMultiscaleSparsifier(const Graph& graph, double alpha);
143 
144  virtual void run() override;
145 
146 private:
147  double alpha;
148 
149 };
150 
155 class RandomSparsifier : public Sparsifier {
156 
157 public:
163  RandomSparsifier(const Graph& graph, double ratio);
164 
165  virtual void run() override;
166 
167 private:
168  double ratio;
169 
170 };
171 
172 } /* namespace NetworKit */
173 #endif /* SPARSIFIERS_H_ */
Imlementation of the non-parametric variant of Simmelian Backbones, as introduced by Nick et al...
Definition: Sparsifiers.h:50
RandomSparsifier(const Graph &graph, double ratio)
Creates a new instance of the Random Sparsifier.
Definition: Sparsifiers.cpp:122
virtual void run()=0
REQ: Needs to fill outputGraph and set hasOutput to true.
SimmelianSparsifierNonParametric(const Graph &graph, double threshold)
Creates a new instance of the non-parametric (jaccard) variant of the Simmelian Backbone calculator...
Definition: Sparsifiers.cpp:32
virtual ~Sparsifier()=default
SimmelianSparsifierParametric(const Graph &graph, int maxRank, int minOverlap)
Creates a new instance of the parametric variant of the Simmelian Backbone calculator.
Definition: Sparsifiers.cpp:50
virtual void run() override
REQ: Needs to fill outputGraph and set hasOutput to true.
Definition: Sparsifiers.cpp:71
Graph getGraph()
Definition: Sparsifiers.cpp:24
bool hasOutput
Definition: Sparsifiers.h:41
Produces sparsified graphs that contain approximately a given percentage of edges of the original gra...
Definition: Sparsifiers.h:155
MultiscaleSparsifier(const Graph &graph, double alpha)
Creates a new instance of the Multiscale Backbone calculator.
Definition: Sparsifiers.cpp:68
Sparsifier(const Graph &inputGraph)
Definition: Sparsifiers.cpp:21
Imlementation of the parametric variant (Top-k neighborhood overlap) of Simmelian Backbones...
Definition: Sparsifiers.h:71
Multiscale backbone using simmelianness as input weight.
Definition: Sparsifiers.h:134
Local Similarity Sparsification as introduced by Satuluri et al.
Definition: Sparsifiers.h:114
virtual void run() override
REQ: Needs to fill outputGraph and set hasOutput to true.
Definition: Sparsifiers.cpp:125
Graph outputGraph
Definition: Sparsifiers.h:40
virtual void run() override
REQ: Needs to fill outputGraph and set hasOutput to true.
Definition: Sparsifiers.cpp:53
virtual void run() override
REQ: Needs to fill outputGraph and set hasOutput to true.
Definition: Sparsifiers.cpp:107
virtual void run() override
REQ: Needs to fill outputGraph and set hasOutput to true.
Definition: Sparsifiers.cpp:35
SimmelianMultiscaleSparsifier(const Graph &graph, double alpha)
Creates a new instance of the Simmelian Multiscale Backbone calculator.
Definition: Sparsifiers.cpp:104
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
LocalSimilaritySparsifier(const Graph &graph, double e)
Creates a new instance of the Local Similarity sparsifier.
Definition: Sparsifiers.cpp:87
const Graph & inputGraph
Definition: Sparsifiers.h:39
In this file, edge score calculators and edge score filters are combined into different sparsificatio...
Definition: Sparsifiers.h:23
virtual void run() override
REQ: Needs to fill outputGraph and set hasOutput to true.
Definition: Sparsifiers.cpp:90
Implementation of the Multiscale Backbone, as introduced by Serrano et al.
Definition: Sparsifiers.h:94