Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::HypernodeArray< T > Class Template Reference

Dynamic arrays indexed with hypernodes. More...

#include <ogdf/hypergraph/Hypergraph.h>

Public Member Functions

 HypernodeArray ()
 Constructs an empty hypernode array associated with no hypergraph. More...
 
 HypernodeArray (const Hypergraph &H, const T &x)
 Constructs a hypernode array associated with H. More...
 
virtual ~HypernodeArray ()
 
void init (const Hypergraph &H)
 Reinitializes the array. Associates the array with H. More...
 
void init (const Hypergraph &H, const T &x)
 Reinitializes the array. Associates the array with H. More...
 
HypernodeArray< T > & operator= (const HypernodeArray< T > &a)
 Assignment operator. More...
 
T & operator[] (hypernode v)
 Returns a reference to the element with index v. More...
 
T & operator[] (int index)
 Returns a reference to the element with index index. More...
 
const T & operator[] (int index) const
 Returns a reference to the element with index index. More...
 
virtual void reregister (const Hypergraph *H)
 

Private Member Functions

virtual void disconnect ()
 
virtual void enlargeTable (int newTableSize)
 
virtual void reinit (int initTableSize)
 

Private Attributes

m_x
 The default value for array elements. More...
 
 OGDF_NEW_DELETE
 

Detailed Description

template<class T>
class ogdf::HypernodeArray< T >

Dynamic arrays indexed with hypernodes.

Warning
Undefined behavior can occur when the array is used in the left-hand side of an assignment and the observed graph is changed in the right-hand side. To resolve the issue, use:
auto tmp = RHS; LHS = std::move(tmp);

Definition at line 401 of file Hypergraph.h.

Constructor & Destructor Documentation

◆ HypernodeArray() [1/2]

template<class T >
ogdf::HypernodeArray< T >::HypernodeArray ( )
inline

Constructs an empty hypernode array associated with no hypergraph.

Definition at line 102 of file HypergraphArray.h.

◆ HypernodeArray() [2/2]

template<class T >
ogdf::HypernodeArray< T >::HypernodeArray ( const Hypergraph H,
const T &  x 
)
inline

Constructs a hypernode array associated with H.

Definition at line 105 of file HypergraphArray.h.

◆ ~HypernodeArray()

template<class T >
virtual ogdf::HypernodeArray< T >::~HypernodeArray ( )
inlinevirtual

Definition at line 112 of file HypergraphArray.h.

Member Function Documentation

◆ disconnect()

template<class T >
virtual void ogdf::HypernodeArray< T >::disconnect ( )
inlineprivatevirtual

Definition at line 179 of file HypergraphArray.h.

◆ enlargeTable()

template<class T >
virtual void ogdf::HypernodeArray< T >::enlargeTable ( int  newTableSize)
inlineprivatevirtual

Definition at line 169 of file HypergraphArray.h.

◆ init() [1/2]

template<class T >
void ogdf::HypernodeArray< T >::init ( const Hypergraph H)
inline

Reinitializes the array. Associates the array with H.

Definition at line 146 of file HypergraphArray.h.

◆ init() [2/2]

template<class T >
void ogdf::HypernodeArray< T >::init ( const Hypergraph H,
const T &  x 
)
inline

Reinitializes the array. Associates the array with H.

Definition at line 152 of file HypergraphArray.h.

◆ operator=()

template<class T >
HypernodeArray<T>& ogdf::HypernodeArray< T >::operator= ( const HypernodeArray< T > &  a)
inline

Assignment operator.

Definition at line 137 of file HypergraphArray.h.

◆ operator[]() [1/3]

template<class T >
T& ogdf::HypernodeArray< T >::operator[] ( hypernode  v)
inline

Returns a reference to the element with index v.

Definition at line 119 of file HypergraphArray.h.

◆ operator[]() [2/3]

template<class T >
T& ogdf::HypernodeArray< T >::operator[] ( int  index)
inline

Returns a reference to the element with index index.

Definition at line 131 of file HypergraphArray.h.

◆ operator[]() [3/3]

template<class T >
const T& ogdf::HypernodeArray< T >::operator[] ( int  index) const
inline

Returns a reference to the element with index index.

Definition at line 125 of file HypergraphArray.h.

◆ reinit()

template<class T >
virtual void ogdf::HypernodeArray< T >::reinit ( int  initTableSize)
inlineprivatevirtual

Definition at line 174 of file HypergraphArray.h.

◆ reregister()

template<class T >
virtual void ogdf::HypernodeArray< T >::reregister ( const Hypergraph H)
inlinevirtual

Definition at line 158 of file HypergraphArray.h.

Member Data Documentation

◆ m_x

template<class T >
T ogdf::HypernodeArray< T >::m_x
private

The default value for array elements.

Definition at line 97 of file HypergraphArray.h.

◆ OGDF_NEW_DELETE

template<class T >
ogdf::HypernodeArray< T >::OGDF_NEW_DELETE
private

Definition at line 185 of file HypergraphArray.h.


The documentation for this class was generated from the following files:
backward::details::move
const T & move(const T &v)
Definition: backward.hpp:243