All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PLM.h
Go to the documentation of this file.
1 /*
2  * PLM.h
3  *
4  * Created on: 20.11.2013
5  * Author: cls
6  */
7 
8 #ifndef PLM_H_
9 #define PLM_H_
10 
12 
13 namespace NetworKit {
14 
20 
21 public:
36  PLM(const Graph& G, bool refine=false, double gamma = 1.0, std::string par="balanced", count maxIter=32, bool turbo = true, bool recurse = true);
37 
38  PLM(const Graph& G, const PLM& other);
39 
40 
46  std::string toString() const override;
47 
51  void run() override;
52 
53  static std::pair<Graph, std::vector<node>> coarsen(const Graph& G, const Partition& zeta);
54 
55  static Partition prolong(const Graph& Gcoarse, const Partition& zetaCoarse, const Graph& Gfine, std::vector<node> nodeToMetaNode);
56 
60  std::map<std::string, std::vector<count> > getTiming();
61 
62 private:
63 
64  std::string parallelism;
65  bool refine;
66  double gamma = 1.0;
67  count maxIter;
68  bool turbo;
69  bool recurse;
70  std::map<std::string, std::vector<count> > timing; // fine-grained running time measurement
71 };
72 
73 } /* namespace NetworKit */
74 
75 #endif /* PLM_H_ */
std::map< std::string, std::vector< count > > getTiming()
Returns fine-grained running time measurements for algorithm engineering purposes.
Definition: PLM.cpp:343
static std::pair< Graph, std::vector< node > > coarsen(const Graph &G, const Partition &zeta)
Definition: PLM.cpp:321
void run() override
Detect communities.
Definition: PLM.cpp:29
Implements a partition of a set, i.e.
Definition: Partition.h:31
const Graph & G
Definition: CommunityDetectionAlgorithm.h:57
uint64_t count
Definition: Globals.h:21
static Partition prolong(const Graph &Gcoarse, const Partition &zetaCoarse, const Graph &Gfine, std::vector< node > nodeToMetaNode)
Definition: PLM.cpp:327
Parallel Louvain Method - a multi-level modularity maximizer.
Definition: PLM.h:19
PLM(const Graph &G, bool refine=false, double gamma=1.0, std::string par="balanced", count maxIter=32, bool turbo=true, bool recurse=true)
Definition: PLM.cpp:21
std::string toString() const override
Get string representation.
Definition: PLM.cpp:302
Abstract base class for community detection/graph clustering algorithms.
Definition: CommunityDetectionAlgorithm.h:20
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79