Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::ClusterSetSimple Class Reference

Simple cluster sets. More...

#include <ogdf/cluster/ClusterSet.h>

Public Member Functions

 ClusterSetSimple (const ClusterGraph &C)
 Creates an empty cluster set associated with clustered graph C. More...
 
 ~ClusterSetSimple ()
 
void clear ()
 Removes all clusters from S. More...
 
const SListPure< cluster > & clusters () const
 Returns a reference to the list of clusters contained in S. More...
 
void insert (cluster c)
 Inserts cluster c into S. More...
 
bool isMember (cluster c) const
 Returns true if cluster c is contained in S, false otherwise. More...
 

Private Attributes

SListPure< clusterm_clusters
 The list of clusters contained in S. More...
 
ClusterArray< bool > m_isContained
 m_isContained[c] is true iff c is contained in S More...
 

Detailed Description

Simple cluster sets.

A cluster set maintains a subset S of the clusters contained in an associated clustered graph. This kind of cluster set only provides efficient operation for testing membership, insertion, and clearing the set.

See also
ClusterSet, ClusterSetPure

Definition at line 53 of file ClusterSet.h.

Constructor & Destructor Documentation

◆ ClusterSetSimple()

ogdf::ClusterSetSimple::ClusterSetSimple ( const ClusterGraph C)
inlineexplicit

Creates an empty cluster set associated with clustered graph C.

Definition at line 56 of file ClusterSet.h.

◆ ~ClusterSetSimple()

ogdf::ClusterSetSimple::~ClusterSetSimple ( )
inline

Definition at line 59 of file ClusterSet.h.

Member Function Documentation

◆ clear()

void ogdf::ClusterSetSimple::clear ( )
inline

Removes all clusters from S.

After this operation, S is empty and still associated with the same clustered graph. The runtime of this operations is O(k), where k is the number of clusters in S before this operation.

Definition at line 83 of file ClusterSet.h.

◆ clusters()

const SListPure<cluster>& ogdf::ClusterSetSimple::clusters ( ) const
inline

Returns a reference to the list of clusters contained in S.

This list can be used for iterating over all clusters in S.

Definition at line 107 of file ClusterSet.h.

◆ insert()

void ogdf::ClusterSetSimple::insert ( cluster  c)
inline

Inserts cluster c into S.

This operation has constant runtime.

Precondition
c is a cluster in the associated clustered graph.

Definition at line 67 of file ClusterSet.h.

◆ isMember()

bool ogdf::ClusterSetSimple::isMember ( cluster  c) const
inline

Returns true if cluster c is contained in S, false otherwise.

This operation has constant runtime.

Precondition
c is a cluster in the associated graph.

Definition at line 98 of file ClusterSet.h.

Member Data Documentation

◆ m_clusters

SListPure<cluster> ogdf::ClusterSetSimple::m_clusters
private

The list of clusters contained in S.

Definition at line 116 of file ClusterSet.h.

◆ m_isContained

ClusterArray<bool> ogdf::ClusterSetSimple::m_isContained
private

m_isContained[c] is true iff c is contained in S

Definition at line 113 of file ClusterSet.h.


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