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

The ClusteredRandomGraphGenerator class is used to create a clustered random graph. More...

#include <ClusteredRandomGraphGenerator.h>

Public Member Functions

 ClusteredRandomGraphGenerator (count n, count k, double pin, double pout)
 Creates a clustered random graph: More...
 
Graph generate () override
 Generates a clustered random graph with the properties given in the constructor. More...
 
Partition getCommunities ()
 Returns the generated ground truth communities. More...
 
- Public Member Functions inherited from NetworKit::StaticGraphGenerator
virtual ~StaticGraphGenerator ()=default
 Default destructor. More...
 

Detailed Description

The ClusteredRandomGraphGenerator class is used to create a clustered random graph.

The number of nodes and the number of edges are adjustable as well as the probabilities for intra-cluster and inter-cluster edges.

Constructor & Destructor Documentation

NetworKit::ClusteredRandomGraphGenerator::ClusteredRandomGraphGenerator ( count  n,
count  k,
double  pin,
double  pout 
)

Creates a clustered random graph:

Parameters
[in]nnumber of nodes
[in]knumber of clusters
[in]pinintra-cluster edge probability
[in]poutinter-cluster edge probability

Member Function Documentation

Graph NetworKit::ClusteredRandomGraphGenerator::generate ( )
overridevirtual

Generates a clustered random graph with the properties given in the constructor.

Returns
The generated graph.

Implements NetworKit::StaticGraphGenerator.

Partition NetworKit::ClusteredRandomGraphGenerator::getCommunities ( )

Returns the generated ground truth communities.

Returns
The generated partition

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