Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::Clusterer Class Reference

#include <ogdf/graphalg/Clusterer.h>

+ Inheritance diagram for ogdf::Clusterer:

Public Member Functions

 Clusterer ()
 Default constructor allowing to cluster multiple graphs with the same instance of the Clusterer graphs. More...
 
 Clusterer (const Graph &G)
 Constructor taking a graph G to be clustered. More...
 
virtual ~Clusterer ()
 
virtual double computeCIndex (const Graph &G, node v) override
 compute a clustering index for each vertex More...
 
virtual double computeCIndex (node v) override
 compute a clustering index for each vertex More...
 
virtual void computeClustering (SList< SimpleCluster * > &sl) override
 compute some kind of clustering on the graph m_pGraph More...
 
void computeEdgeStrengths (const Graph &G, EdgeArray< double > &strength)
 
void computeEdgeStrengths (EdgeArray< double > &strength)
 
virtual void createClusterGraph (ClusterGraph &C) override
 translate computed clustering into cluster hierarchy in cluster graph C More...
 
void setAutomaticThresholds (int numValues)
 
void setClusteringThresholds (const List< double > &threshs)
 
void setRecursive (bool b)
 
void setStopIndex (double stop)
 
- Public Member Functions inherited from ogdf::ClustererModule
 ClustererModule ()
 Default constructor, initializes a clustering module. More...
 
 ClustererModule (const Graph &G)
 
virtual double averageCIndex ()
 compute the average clustering index for the given graph More...
 
virtual double averageCIndex (const Graph &G)
 
const GraphgetGraph () const
 Returns the graph to be clustered. More...
 
void setGraph (const Graph &G)
 Sets the graph to be clustered. More...
 

Protected Attributes

int m_autoThreshNum
 
List< double > m_autoThresholds
 
List< double > m_defaultThresholds
 
EdgeArray< double > m_edgeValue
 
bool m_recursive
 
double m_stopIndex
 
List< double > m_thresholds
 
NodeArray< double > m_vertexValue
 
- Protected Attributes inherited from ogdf::ClustererModule
const Graphm_pGraph
 

Detailed Description

Clustering is determined based on the threshold values (connectivity thresholds determine edges to be deleted) and stopped if average clustering index drops below m_stopIndex.

Precondition
Input graph has to be connected

Definition at line 58 of file Clusterer.h.

Constructor & Destructor Documentation

◆ Clusterer() [1/2]

ogdf::Clusterer::Clusterer ( const Graph G)
explicit

Constructor taking a graph G to be clustered.

◆ Clusterer() [2/2]

ogdf::Clusterer::Clusterer ( )

Default constructor allowing to cluster multiple graphs with the same instance of the Clusterer graphs.

◆ ~Clusterer()

virtual ogdf::Clusterer::~Clusterer ( )
inlinevirtual

Definition at line 68 of file Clusterer.h.

Member Function Documentation

◆ computeCIndex() [1/2]

virtual double ogdf::Clusterer::computeCIndex ( const Graph G,
node  v 
)
inlineoverridevirtual

compute a clustering index for each vertex

Implements ogdf::ClustererModule.

Definition at line 101 of file Clusterer.h.

◆ computeCIndex() [2/2]

virtual double ogdf::Clusterer::computeCIndex ( node  v)
inlineoverridevirtual

compute a clustering index for each vertex

Implements ogdf::ClustererModule.

Definition at line 99 of file Clusterer.h.

◆ computeClustering()

virtual void ogdf::Clusterer::computeClustering ( SList< SimpleCluster * > &  sl)
overridevirtual

compute some kind of clustering on the graph m_pGraph

This is the algorithm call that has to be implemented by derived classes

Parameters
slis the resulting list of clusters

Implements ogdf::ClustererModule.

◆ computeEdgeStrengths() [1/2]

void ogdf::Clusterer::computeEdgeStrengths ( const Graph G,
EdgeArray< double > &  strength 
)

◆ computeEdgeStrengths() [2/2]

void ogdf::Clusterer::computeEdgeStrengths ( EdgeArray< double > &  strength)

◆ createClusterGraph()

virtual void ogdf::Clusterer::createClusterGraph ( ClusterGraph C)
overridevirtual

translate computed clustering into cluster hierarchy in cluster graph C

Implements ogdf::ClustererModule.

◆ setAutomaticThresholds()

void ogdf::Clusterer::setAutomaticThresholds ( int  numValues)
inline

Definition at line 84 of file Clusterer.h.

◆ setClusteringThresholds()

void ogdf::Clusterer::setClusteringThresholds ( const List< double > &  threshs)

◆ setRecursive()

void ogdf::Clusterer::setRecursive ( bool  b)
inline

Definition at line 87 of file Clusterer.h.

◆ setStopIndex()

void ogdf::Clusterer::setStopIndex ( double  stop)
inline

Definition at line 95 of file Clusterer.h.

Member Data Documentation

◆ m_autoThreshNum

int ogdf::Clusterer::m_autoThreshNum
protected

Definition at line 135 of file Clusterer.h.

◆ m_autoThresholds

List<double> ogdf::Clusterer::m_autoThresholds
protected

Definition at line 127 of file Clusterer.h.

◆ m_defaultThresholds

List<double> ogdf::Clusterer::m_defaultThresholds
protected

Definition at line 128 of file Clusterer.h.

◆ m_edgeValue

EdgeArray<double> ogdf::Clusterer::m_edgeValue
protected

Definition at line 124 of file Clusterer.h.

◆ m_recursive

bool ogdf::Clusterer::m_recursive
protected

Definition at line 131 of file Clusterer.h.

◆ m_stopIndex

double ogdf::Clusterer::m_stopIndex
protected

Definition at line 129 of file Clusterer.h.

◆ m_thresholds

List<double> ogdf::Clusterer::m_thresholds
protected

Definition at line 126 of file Clusterer.h.

◆ m_vertexValue

NodeArray<double> ogdf::Clusterer::m_vertexValue
protected

Definition at line 125 of file Clusterer.h.


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