Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::HyperedgeArray< T > Class Template Reference

Dynamic arrays indexed with nodes. More...

#include <ogdf/hypergraph/Hypergraph.h>

Public Member Functions

 HyperedgeArray ()
 Constructs an empty hypernode array associated with no graph. More...
 
 HyperedgeArray (const Hypergraph &H, const T &x)
 Constructs a hypernode array associated with H. More...
 
virtual ~HyperedgeArray ()
 Destructor. More...
 
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...
 
HyperedgeArray< T > & operator= (const HyperedgeArray< T > &a)
 Assignment operator. More...
 
T & operator[] (hyperedge e)
 Returns a reference to the element with the index of e. 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)
 
bool valid () const
 Returns true iff the array is associated with a hypergraph. More...
 

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::HyperedgeArray< T >

Dynamic arrays indexed with nodes.

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 402 of file Hypergraph.h.

Constructor & Destructor Documentation

◆ HyperedgeArray() [1/2]

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

Constructs an empty hypernode array associated with no graph.

Definition at line 201 of file HypergraphArray.h.

◆ HyperedgeArray() [2/2]

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

Constructs a hypernode array associated with H.

Definition at line 207 of file HypergraphArray.h.

◆ ~HyperedgeArray()

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

Destructor.

Definition at line 215 of file HypergraphArray.h.

Member Function Documentation

◆ disconnect()

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

Definition at line 288 of file HypergraphArray.h.

◆ enlargeTable()

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

Definition at line 278 of file HypergraphArray.h.

◆ init() [1/2]

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

Reinitializes the array. Associates the array with H.

Definition at line 255 of file HypergraphArray.h.

◆ init() [2/2]

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

Reinitializes the array. Associates the array with H.

Definition at line 261 of file HypergraphArray.h.

◆ operator=()

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

Assignment operator.

Definition at line 246 of file HypergraphArray.h.

◆ operator[]() [1/3]

template<class T >
T& ogdf::HyperedgeArray< T >::operator[] ( hyperedge  e)
inline

Returns a reference to the element with the index of e.

Definition at line 228 of file HypergraphArray.h.

◆ operator[]() [2/3]

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

Returns a reference to the element with index index.

Definition at line 240 of file HypergraphArray.h.

◆ operator[]() [3/3]

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

Returns a reference to the element with index index.

Definition at line 234 of file HypergraphArray.h.

◆ reinit()

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

Definition at line 283 of file HypergraphArray.h.

◆ reregister()

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

Definition at line 267 of file HypergraphArray.h.

◆ valid()

template<class T >
bool ogdf::HyperedgeArray< T >::valid ( ) const
inline

Returns true iff the array is associated with a hypergraph.

Definition at line 222 of file HypergraphArray.h.

Member Data Documentation

◆ m_x

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

The default value for array elements.

Definition at line 196 of file HypergraphArray.h.

◆ OGDF_NEW_DELETE

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

Definition at line 294 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