Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::Clusterer Class Reference

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. More...

#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.
 
 Clusterer (const Graph &G)
 Constructor taking a graph G to be clustered.
 
virtual ~Clusterer ()
 
virtual double computeCIndex (const Graph &G, node v) override
 compute a clustering index for each vertex
 
virtual double computeCIndex (node v) override
 compute a clustering index for each vertex
 
virtual void computeClustering (SList< SimpleCluster * > &sl) override
 compute some kind of clustering on the graph m_pGraph
 
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
 
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.
 
 ClustererModule (const Graph &G)
 
virtual double averageCIndex ()
 compute the average clustering index for the given graph
 
virtual double averageCIndex (const Graph &G)
 
const GraphgetGraph () const
 Returns the graph to be clustered.
 
void setGraph (const Graph &G)
 Sets the graph to be clustered.
 

Protected Attributes

int m_autoThreshNum
 
List< doublem_autoThresholds
 
List< doublem_defaultThresholds
 
EdgeArray< doublem_edgeValue
 
bool m_recursive
 
double m_stopIndex
 
List< doublem_thresholds
 
NodeArray< doublem_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 51 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 61 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 94 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 92 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 77 of file Clusterer.h.

◆ setClusteringThresholds()

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

◆ setRecursive()

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

Definition at line 80 of file Clusterer.h.

◆ setStopIndex()

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

Definition at line 88 of file Clusterer.h.

Member Data Documentation

◆ m_autoThreshNum

int ogdf::Clusterer::m_autoThreshNum
protected

Definition at line 128 of file Clusterer.h.

◆ m_autoThresholds

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

Definition at line 120 of file Clusterer.h.

◆ m_defaultThresholds

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

Definition at line 121 of file Clusterer.h.

◆ m_edgeValue

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

Definition at line 117 of file Clusterer.h.

◆ m_recursive

bool ogdf::Clusterer::m_recursive
protected

Definition at line 124 of file Clusterer.h.

◆ m_stopIndex

double ogdf::Clusterer::m_stopIndex
protected

Definition at line 122 of file Clusterer.h.

◆ m_thresholds

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

Definition at line 119 of file Clusterer.h.

◆ m_vertexValue

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

Definition at line 118 of file Clusterer.h.


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