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

Provides several methods for generating special clusterings. More...

#include <ClusteringGenerator.h>

Public Member Functions

virtual Partition makeSingletonClustering (Graph &G)
 Make a singleton clustering of Graph G, i.e. More...
 
virtual Partition makeOneClustering (Graph &G)
 Make a 1-clustering of Graph G, i.e. More...
 
virtual Partition makeRandomClustering (Graph &G, count k)
 Make a clustering of Graph G with k clusters to which the nodes are randomly assigned. More...
 
virtual Partition makeContinuousBalancedClustering (Graph &G, count k)
 Make a clustering of Graph G with k clusters. More...
 
virtual Partition makeNoncontinuousBalancedClustering (Graph &G, count k)
 Make a clustering of a Graph G with k clusters. More...
 

Detailed Description

Provides several methods for generating special clusterings.

Member Function Documentation

Partition NetworKit::ClusteringGenerator::makeContinuousBalancedClustering ( Graph G,
count  k 
)
virtual

Make a clustering of Graph G with k clusters.

The first n/k nodes are assigned to the first cluster, the next n/k nodes to the second cluster and so on.

Parameters
GThe graph.
kThe amount of clusters.
Returns
A Partition with k clusters and each node assigned like described above.
Partition NetworKit::ClusteringGenerator::makeNoncontinuousBalancedClustering ( Graph G,
count  k 
)
virtual

Make a clustering of a Graph G with k clusters.

Each node u is assigned to cluster u % k. When the number of nodes n is quadratic and k is the square root of n, this clustering is complementary to the continuous balanced clustering in the sense that no pair of nodes that is in the same cluster in one of the clusterings is in the same cluster in the other clustering.

Parameters
GThe graph.
kThe amount of clusters.
Returns
A Partition with k clusters and each node assigned as described above.
Partition NetworKit::ClusteringGenerator::makeOneClustering ( Graph G)
virtual

Make a 1-clustering of Graph G, i.e.

a clustering in which all nodes belong to the same cluster.

Parameters
GThe graph.
Returns
A Partition in which all nodes belong to the same cluster.
Partition NetworKit::ClusteringGenerator::makeRandomClustering ( Graph G,
count  k 
)
virtual

Make a clustering of Graph G with k clusters to which the nodes are randomly assigned.

Parameters
GThe graph.
kThe amount of clusters.
Returns
A Partition with k clusters and each node randomly assigned to one of them.
Partition NetworKit::ClusteringGenerator::makeSingletonClustering ( Graph G)
virtual

Make a singleton clustering of Graph G, i.e.

a clustering in which every node belongs to its own cluster.

Parameters
GThe graph.
Returns
A Partition in which every node belongs to its own cluster.

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