Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::steiner_tree::DreyfusWagnerFullComponentGenerator< T > Class Template Reference

A generator for full components (for Steiner tree approximations) based on the Dreyfus-Wagner algorithm. More...

#include <ogdf/graphalg/steiner_tree/DreyfusWagnerFullComponentGenerator.h>

Classes

struct  DWMData
 
class  SortedNodeListHashFunc
 

Public Member Functions

 DreyfusWagnerFullComponentGenerator (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< NodeArray< T >> &distance)
 The constructor. More...
 
void call (int restricted)
 
T getSteinerTreeFor (const List< node > &terminals, EdgeWeightedGraphCopy< T > &tree)
 Construct a Steiner tree for the given set of terminals. More...
 

Private Types

using NodePairs = Array< NodePair >
 

Private Member Functions

T costOf (const List< node > &key) const
 
const DWMData dataOf (const List< node > &key) const
 
void insertSorted (List< node > &list, node v) const
 

Private Attributes

const NodeArray< NodeArray< T > > & m_distance
 A reference to the full distance matrix. More...
 
const EdgeWeightedGraph< T > & m_G
 A reference to the graph instance. More...
 
Hashing< List< node >, DWMData, SortedNodeListHashFunc > m_map
 A hash array for keys of size > 2. More...
 
const List< node > & m_terminals
 A reference to the index-sorted list of terminals. More...
 

Detailed Description

template<typename T>
class ogdf::steiner_tree::DreyfusWagnerFullComponentGenerator< T >

A generator for full components (for Steiner tree approximations) based on the Dreyfus-Wagner algorithm.

Definition at line 52 of file DreyfusWagnerFullComponentGenerator.h.

Member Typedef Documentation

◆ NodePairs

Definition at line 58 of file DreyfusWagnerFullComponentGenerator.h.

Constructor & Destructor Documentation

◆ DreyfusWagnerFullComponentGenerator()

template<typename T>
ogdf::steiner_tree::DreyfusWagnerFullComponentGenerator< T >::DreyfusWagnerFullComponentGenerator ( const EdgeWeightedGraph< T > &  G,
const List< node > &  terminals,
const NodeArray< NodeArray< T >> &  distance 
)
inline

The constructor.

Precondition
The list of terminals has to be sorted by index (use sortTerminals)

Definition at line 113 of file DreyfusWagnerFullComponentGenerator.h.

Member Function Documentation

◆ call()

template<typename T>
void ogdf::steiner_tree::DreyfusWagnerFullComponentGenerator< T >::call ( int  restricted)
inline

Definition at line 121 of file DreyfusWagnerFullComponentGenerator.h.

◆ costOf()

template<typename T>
T ogdf::steiner_tree::DreyfusWagnerFullComponentGenerator< T >::costOf ( const List< node > &  key) const
inlineprivate

Definition at line 87 of file DreyfusWagnerFullComponentGenerator.h.

◆ dataOf()

template<typename T>
const DWMData ogdf::steiner_tree::DreyfusWagnerFullComponentGenerator< T >::dataOf ( const List< node > &  key) const
inlineprivate

Definition at line 77 of file DreyfusWagnerFullComponentGenerator.h.

◆ getSteinerTreeFor()

template<typename T>
T ogdf::steiner_tree::DreyfusWagnerFullComponentGenerator< T >::getSteinerTreeFor ( const List< node > &  terminals,
EdgeWeightedGraphCopy< T > &  tree 
)
inline

Construct a Steiner tree for the given set of terminals.

Definition at line 210 of file DreyfusWagnerFullComponentGenerator.h.

◆ insertSorted()

template<typename T>
void ogdf::steiner_tree::DreyfusWagnerFullComponentGenerator< T >::insertSorted ( List< node > &  list,
node  v 
) const
inlineprivate

Definition at line 97 of file DreyfusWagnerFullComponentGenerator.h.

Member Data Documentation

◆ m_distance

template<typename T>
const NodeArray<NodeArray<T> >& ogdf::steiner_tree::DreyfusWagnerFullComponentGenerator< T >::m_distance
private

A reference to the full distance matrix.

Definition at line 56 of file DreyfusWagnerFullComponentGenerator.h.

◆ m_G

template<typename T>
const EdgeWeightedGraph<T>& ogdf::steiner_tree::DreyfusWagnerFullComponentGenerator< T >::m_G
private

A reference to the graph instance.

Definition at line 54 of file DreyfusWagnerFullComponentGenerator.h.

◆ m_map

A hash array for keys of size > 2.

Definition at line 74 of file DreyfusWagnerFullComponentGenerator.h.

◆ m_terminals

template<typename T>
const List<node>& ogdf::steiner_tree::DreyfusWagnerFullComponentGenerator< T >::m_terminals
private

A reference to the index-sorted list of terminals.

Definition at line 55 of file DreyfusWagnerFullComponentGenerator.h.


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