Class IntrapartitionDensity

Inheritance Relationships

Base Type

Class Documentation

class IntrapartitionDensity : public NetworKit::LocalPartitionEvaluation

The intra-cluster density of a partition is defined as the number of existing edges divided by the number of possible edges. The global value is the sum of all existing intra-cluster edges divided by the sum of all possible intra-cluster edges.

Public Functions

virtual void run() override

Execute the algorithm. The algorithm is not parallel.

inline double getGlobal() const

Get the global intra-cluster density.


The global intra-cluster density.

inline virtual bool isSmallBetter() const override

This value should be high in a good clustering.


false - high values are better than small values.

LocalPartitionEvaluation(const Graph &G, const Partition &P)

Initialize the partition evaluation method.

  • G – The graph on which the evaluation shall be performed

  • P – The partition that shall be evaluated.