Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::NodeColoringModule::SubsetIterator Struct Reference

Struct to iterate over all node subsets of a given size. More...

#include <ogdf/graphalg/NodeColoringModule.h>

Public Types

using Index = int
 Data type for the indices. More...
 

Public Member Functions

 SubsetIterator (Array< node > &set, Index subsetSize)
 Creates the SubsetIterator with a given set to iterate and the size of the subsets. More...
 
bool advance ()
 Advances the iterator so that the next subset can be queried. More...
 
List< nodecurrentSubset ()
 Returns the current subset. More...
 
bool isOk ()
 Returns if the iterator, i.e. More...
 

Public Attributes

Array< Indexm_indices
 
Index m_numElements
 
Array< node > & m_set
 

Detailed Description

Struct to iterate over all node subsets of a given size.

Definition at line 120 of file NodeColoringModule.h.

Member Typedef Documentation

◆ Index

Data type for the indices.

Definition at line 124 of file NodeColoringModule.h.

Constructor & Destructor Documentation

◆ SubsetIterator()

ogdf::NodeColoringModule::SubsetIterator::SubsetIterator ( Array< node > &  set,
Index  subsetSize 
)
inline

Creates the SubsetIterator with a given set to iterate and the size of the subsets.

Parameters
setThe given node set as array
subsetSizeThe size of each subset

Definition at line 137 of file NodeColoringModule.h.

Member Function Documentation

◆ advance()

bool ogdf::NodeColoringModule::SubsetIterator::advance ( )
inline

Advances the iterator so that the next subset can be queried.

Returns
true, iff the advancing was successful

Definition at line 178 of file NodeColoringModule.h.

◆ currentSubset()

List<node> ogdf::NodeColoringModule::SubsetIterator::currentSubset ( )
inline

Returns the current subset.

Returns
The current subset

Definition at line 164 of file NodeColoringModule.h.

◆ isOk()

bool ogdf::NodeColoringModule::SubsetIterator::isOk ( )
inline

Returns if the iterator, i.e.

the next subset to extract is ok.

Returns
true, iff the iterator is ok

Definition at line 150 of file NodeColoringModule.h.

Member Data Documentation

◆ m_indices

Array<Index> ogdf::NodeColoringModule::SubsetIterator::m_indices

Definition at line 127 of file NodeColoringModule.h.

◆ m_numElements

Index ogdf::NodeColoringModule::SubsetIterator::m_numElements

Definition at line 128 of file NodeColoringModule.h.

◆ m_set

Array<node>& ogdf::NodeColoringModule::SubsetIterator::m_set

Definition at line 126 of file NodeColoringModule.h.


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