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

The intra-cluster density of a partition is defined as the number of existing edges divided by the number of possible edges. More...

#include <IntrapartitionDensity.h>

Public Member Functions

virtual void run () override
 Execute the algorithm. More...
 
double getGlobal () const
 Get the global intra-cluster density. More...
 
bool isParallel () const override
 
bool isSmallBetter () const override
 This value should be high in a good clustering. More...
 
- Public Member Functions inherited from NetworKit::LocalPartitionEvaluation
 LocalPartitionEvaluation (const Graph &G, const Partition &P)
 Initialize the partition evaluation method. More...
 
- Public Member Functions inherited from NetworKit::LocalCommunityEvaluation
virtual ~LocalCommunityEvaluation ()=default
 Default destructor for the virtual base class. More...
 
double getWeightedAverage () const
 Get the average value weighted by cluster size. More...
 
double getUnweightedAverage () const
 Get the (unweighted) average value of all clusters. More...
 
double getMaximumValue () const
 Get the maximum value of all clusters. More...
 
double getMinimumValue () const
 Get the minimum value of all clusters. More...
 
double getValue (index i) const
 Get the value of the specified cluster. More...
 
std::vector< double > getValues () const
 Get the values of all clusters. 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 std::string toString () const
 Returns a string with the algorithm's name and its parameters, if there are any. More...
 

Protected Attributes

double globalValue
 
- Protected Attributes inherited from NetworKit::LocalPartitionEvaluation
const GraphG
 
const PartitionP
 
- Protected Attributes inherited from NetworKit::LocalCommunityEvaluation
double weightedAverage
 
double unweightedAverage
 
double maximumValue
 
double minimumValue
 
std::vector< double > values
 
- Protected Attributes inherited from NetworKit::Algorithm
bool hasRun
 A boolean variable indicating whether an algorithm has finished its computation or not. More...
 

Detailed Description

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.

Member Function Documentation

double NetworKit::IntrapartitionDensity::getGlobal ( ) const
inline

Get the global intra-cluster density.

Returns
The global intra-cluster density.
bool NetworKit::IntrapartitionDensity::isParallel ( ) const
inlineoverridevirtual
Returns
false - this algorithm is not parallel.

Reimplemented from NetworKit::Algorithm.

bool NetworKit::IntrapartitionDensity::isSmallBetter ( ) const
inlineoverridevirtual

This value should be high in a good clustering.

Returns
false - high values are better than small values.

Implements NetworKit::LocalCommunityEvaluation.

void NetworKit::IntrapartitionDensity::run ( )
overridevirtual

Execute the algorithm.

Implements NetworKit::Algorithm.

Member Data Documentation

double NetworKit::IntrapartitionDensity::globalValue
protected

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