All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
NetworKit::PLM Class Reference

Parallel Louvain Method - a multi-level modularity maximizer. More...

#include <PLM.h>

Public Member Functions

 PLM (const Graph &G, bool refine=false, double gamma=1.0, std::string par="balanced", count maxIter=32, bool turbo=true, bool recurse=true)
 
 PLM (const Graph &G, const PLM &other)
 
std::string toString () const override
 Get string representation. More...
 
void run () override
 Detect communities. More...
 
std::map< std::string,
std::vector< count > > 
getTiming ()
 Returns fine-grained running time measurements for algorithm engineering purposes. More...
 
- Public Member Functions inherited from NetworKit::CommunityDetectionAlgorithm
 CommunityDetectionAlgorithm (const Graph &G)
 A community detection algorithm operates on a graph, so the constructor expects a graph. More...
 
 CommunityDetectionAlgorithm (const Graph &G, const Partition baseClustering)
 A community detection algorithm operates on a graph, so the constructor expects a graph. More...
 
virtual ~CommunityDetectionAlgorithm ()=default
 Default destructor. More...
 
virtual Partition getPartition ()
 Returns the result of the run method or throws an error, if the algorithm hasn't run yet. More...
 
- Public Member Functions inherited from NetworKit::Algorithm
 Algorithm ()
 Constructor to the algorithm base class. More...
 
virtual ~Algorithm ()=default
 Virtual default destructor. More...
 
bool hasFinished () const
 Indicates whether an algorithm has completed computation or not. More...
 
void assureFinished () const
 Assure that the algorithm has been run, throws a std::runtime_error otherwise. More...
 
virtual bool isParallel () const
 

Static Public Member Functions

static std::pair< Graph,
std::vector< node > > 
coarsen (const Graph &G, const Partition &zeta)
 
static Partition prolong (const Graph &Gcoarse, const Partition &zetaCoarse, const Graph &Gfine, std::vector< node > nodeToMetaNode)
 

Additional Inherited Members

- Protected Attributes inherited from NetworKit::CommunityDetectionAlgorithm
const GraphG
 
Partition result
 
- Protected Attributes inherited from NetworKit::Algorithm
bool hasRun
 A boolean variable indicating whether an algorithm has finished its computation or not. More...
 

Detailed Description

Parallel Louvain Method - a multi-level modularity maximizer.

Constructor & Destructor Documentation

NetworKit::PLM::PLM ( const Graph G,
bool  refine = false,
double  gamma = 1.0,
std::string  par = "balanced",
count  maxIter = 32,
bool  turbo = true,
bool  recurse = true 
)
Parameters
[in]Ginput graph
[in]refineadd a second move phase to refine the communities
[in]parparallelization strategy
[in]gammamulti-resolution modularity parameter: 1.0 -> standard modularity 0.0 -> one community 2m -> singleton communities
[in]maxItermaximum number of iterations for move phase
[in]parallelCoarseninguse parallel graph coarsening
[in]turbofaster but uses O(n) additional memory per thread
[in]recurseuse recursive coarsening, see http://journals.aps.org/pre/abstract/10.1103/PhysRevE.89.049902 for some explanations (default: true)
NetworKit::PLM::PLM ( const Graph G,
const PLM other 
)

Member Function Documentation

std::pair< Graph, std::vector< node > > NetworKit::PLM::coarsen ( const Graph G,
const Partition zeta 
)
static
std::map< std::string, std::vector< count > > NetworKit::PLM::getTiming ( )

Returns fine-grained running time measurements for algorithm engineering purposes.

Partition NetworKit::PLM::prolong ( const Graph Gcoarse,
const Partition zetaCoarse,
const Graph Gfine,
std::vector< node nodeToMetaNode 
)
static
void NetworKit::PLM::run ( )
overridevirtual

Detect communities.

Implements NetworKit::CommunityDetectionAlgorithm.

std::string NetworKit::PLM::toString ( ) const
overridevirtual

Get string representation.

Returns
String representation of this algorithm.

Reimplemented from NetworKit::CommunityDetectionAlgorithm.


The documentation for this class was generated from the following files: