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

Virtual base class of all evaluation methods for a single clustering which is based on the evaluation of single clusters. More...

#include <LocalCommunityEvaluation.h>

Public Member Functions

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...
 
virtual bool isSmallBetter () const =0
 If small values are better (otherwise large values are better). More...
 
- Public Member Functions inherited from NetworKit::Algorithm
 Algorithm ()
 Constructor to the algorithm base class. More...
 
virtual ~Algorithm ()=default
 Virtual default destructor. More...
 
virtual void run ()=0
 The generic run method which calls runImpl() and takes care of setting to the appropriate value. 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...
 
virtual bool isParallel () const
 

Protected Attributes

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

Virtual base class of all evaluation methods for a single clustering which is based on the evaluation of single clusters.

This is the base class both for Partitions as well as for Covers.

Constructor & Destructor Documentation

virtual NetworKit::LocalCommunityEvaluation::~LocalCommunityEvaluation ( )
virtualdefault

Default destructor for the virtual base class.

Member Function Documentation

double NetworKit::LocalCommunityEvaluation::getMaximumValue ( ) const
inline

Get the maximum value of all clusters.

Returns
The maximum value.
double NetworKit::LocalCommunityEvaluation::getMinimumValue ( ) const
inline

Get the minimum value of all clusters.

Returns
The minimum value.
double NetworKit::LocalCommunityEvaluation::getUnweightedAverage ( ) const
inline

Get the (unweighted) average value of all clusters.

Returns
The unweighted average value.
double NetworKit::LocalCommunityEvaluation::getValue ( index  i) const
inline

Get the value of the specified cluster.

Parameters
iThe cluster to get the value for.
Returns
The value of cluster i.
std::vector<double> NetworKit::LocalCommunityEvaluation::getValues ( ) const
inline

Get the values of all clusters.

Returns
The values of all clusters.
double NetworKit::LocalCommunityEvaluation::getWeightedAverage ( ) const
inline

Get the average value weighted by cluster size.

Returns
The weighted average value.
virtual bool NetworKit::LocalCommunityEvaluation::isSmallBetter ( ) const
pure virtual

Member Data Documentation

double NetworKit::LocalCommunityEvaluation::maximumValue
protected
double NetworKit::LocalCommunityEvaluation::minimumValue
protected
double NetworKit::LocalCommunityEvaluation::unweightedAverage
protected
std::vector<double> NetworKit::LocalCommunityEvaluation::values
protected
double NetworKit::LocalCommunityEvaluation::weightedAverage
protected

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