Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::steiner_tree::goemans::Approximation< T >::TemporaryEdges Struct Reference

Add edges into a blowup graph and delete them on destruction. More...

+ Inheritance diagram for ogdf::steiner_tree::goemans::Approximation< T >::TemporaryEdges:

Public Member Functions

 TemporaryEdges (BlowupGraph< T > &blowupGraph)
 Construct object for a specific blowupGraph.
 
 ~TemporaryEdges ()
 Remove the edges again.
 
edge add (node v, node w, T cost, int capacity)
 Add a temporary edge to the blowup graph.
 
- Public Member Functions inherited from ogdf::ArrayBuffer< edge >
 ArrayBuffer ()
 Creates an empty array buffer, without initial memory allocation.
 
 ArrayBuffer (ArrayBuffer< edge, int > &&buffer)
 Creates an array buffer containing the elements of buffer (move semantics).
 
 ArrayBuffer (const Array< edge, int > &source, bool autogrow=true)
 Creates an array buffer, initialized by the given array; you may specify that the array should not grow.
 
 ArrayBuffer (const ArrayBuffer< edge, int > &buffer)
 Creates an array buffer that is a copy of buffer.
 
 ArrayBuffer (int size, bool autogrow=true)
 Creates an empty array buffer, allocating memory for up to size elements; you may specify that the array should not grow automatically.
 
void clear ()
 Clears the buffer.
 
bool isGrowable () const
 Returns whether the buffer will automatically expand if the initial size is insufficient.
 
void leftShift (ArrayBuffer< int, int > &ind)
 Removes the components listed in the buffer ind by shifting the remaining components to the left.
 
void setCapacity (int newCapacity)
 Changes the capacity of the buffer (independent whether the buffer is growable of not).
 
void setGrowable (bool _growable)
 Sets the flag whether the buffer will automatically expand if the initial size is insufficient.
 
iterator begin ()
 Returns an iterator to the first element.
 
const_iterator begin () const
 Returns a const iterator to the first element.
 
iterator end ()
 Returns an iterator to one past the last element.
 
const_iterator end () const
 Returns a const iterator to one past the last element.
 
reverse_iterator rbegin ()
 Returns a reverse iterator to the last element.
 
const_reverse_iterator rbegin () const
 Returns a const reverse iterator to the last element.
 
reverse_iterator rend ()
 Returns a reverse iterator to one before the first element.
 
const_reverse_iterator rend () const
 Returns a const reverse iterator to one before the first element.
 
const edgeoperator[] (int i) const
 Returns a reference to the element at position i.
 
edgeoperator[] (int i)
 Returns a reference to the element at position i.
 
const edgetop () const
 Returns the newest element of the buffer.
 
edgetop ()
 Returns the newest element of the buffer.
 
void push (edge e)
 Puts a new element in the buffer.
 
void pop ()
 Removes the newest element from the buffer.
 
edge popRet ()
 Removes the newest element from the buffer and returns it.
 
bool empty () const
 Returns true if the buffer is empty, false otherwise.
 
bool full () const
 Returns true iff the buffer is non-growable and filled.
 
int size () const
 Returns number of elements in the buffer.
 
int capacity () const
 Returns the current capacity of the datastructure. Note that this value is rather irrelevant if the array is growable.
 
void init ()
 Reinitializes the array, clearing it, and without initial memory allocation.
 
void init (int size)
 Reinitializes the array, clearing it, and allocating memory for up to size elements.
 
ArrayBuffer< edge, int > & operator= (const ArrayBuffer< edge, int > &buffer)
 Assignment operator.
 
ArrayBuffer< edge, int > & operator= (ArrayBuffer< edge, int > &&buffer)
 Assignment operator (move semantics).
 
void compactCpycon (Array< edge, int > &A2) const
 Generates a compact copy holding the current elements.
 
void compactCopy (Array< edge, int > &A2) const
 Generates a compact copy holding the current elements.
 
void compactCopy (Array< edge, int > &A2) const
 Generates a compact copy holding the current elements.
 
bool operator== (const ArrayBuffer< edge, int > &L) const
 Equality operator.
 
bool operator!= (const ArrayBuffer< edge, int > &L) const
 Inequality operator.
 
int linearSearch (const edge &x) const
 Performs a linear search for element x.
 
int linearSearch (const edge &x, const COMPARER &comp) const
 Performs a linear search for element x with comparer comp.
 
void quicksort ()
 Sorts buffer using Quicksort.
 
void quicksort (const COMPARER &comp)
 Sorts buffer using Quicksort and a user-defined comparer comp.
 
int binarySearch (const edge &e) const
 Performs a binary search for element e.
 
int binarySearch (const edge &e, const COMPARER &comp) const
 Performs a binary search for element e with comparer comp.
 
void permute (int l, int r, RNG &rng)
 Randomly permutes the subarray with index set [l..r] using random number generator rng.
 
void permute (RNG &rng)
 Randomly permutes the array using random number generator rng.
 
void permute (int l, int r)
 Randomly permutes the subarray with index set [l..r].
 
void permute ()
 Randomly permutes the array.
 

Private Attributes

BlowupGraph< T > & m_blowupGraph
 

Additional Inherited Members

- Public Types inherited from ogdf::ArrayBuffer< edge >
using const_iterator = typename Array< edge, int >::const_iterator
 
using const_reverse_iterator = typename Array< edge, int >::const_reverse_iterator
 
using iterator = typename Array< edge, int >::iterator
 
using key_type = int
 
using reverse_iterator = typename Array< edge, int >::reverse_iterator
 
using value_type = edge
 

Detailed Description

template<typename T>
struct ogdf::steiner_tree::goemans::Approximation< T >::TemporaryEdges

Add edges into a blowup graph and delete them on destruction.

Definition at line 60 of file Approximation.h.

Constructor & Destructor Documentation

◆ TemporaryEdges()

template<typename T >
ogdf::steiner_tree::goemans::Approximation< T >::TemporaryEdges::TemporaryEdges ( BlowupGraph< T > &  blowupGraph)
inline

Construct object for a specific blowupGraph.

Definition at line 62 of file Approximation.h.

◆ ~TemporaryEdges()

template<typename T >
ogdf::steiner_tree::goemans::Approximation< T >::TemporaryEdges::~TemporaryEdges ( )
inline

Remove the edges again.

Definition at line 72 of file Approximation.h.

Member Function Documentation

◆ add()

template<typename T >
edge ogdf::steiner_tree::goemans::Approximation< T >::TemporaryEdges::add ( node  v,
node  w,
cost,
int  capacity 
)
inline

Add a temporary edge to the blowup graph.

Definition at line 65 of file Approximation.h.

Member Data Documentation

◆ m_blowupGraph

template<typename T >
BlowupGraph<T>& ogdf::steiner_tree::goemans::Approximation< T >::TemporaryEdges::m_blowupGraph
private

Definition at line 75 of file Approximation.h.


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