Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::HotQueueHandle< V, P, HeapHandle > Struct Template Reference

Heap-on-Top handle to inserted items. More...

#include <ogdf/basic/heap/HotQueue.h>

Public Member Functions

 HotQueueHandle (const HotQueueHandle &other)
 
HotQueueHandleoperator= (const HotQueueHandle &other)
 

Private Types

enum  Type { Type::heap, Type::bucket }
 

Private Member Functions

 HotQueueHandle (HeapHandle handle)
 Creates heap-type handle. More...
 
 HotQueueHandle (std::size_t index, HotQueueNode< V, P > *queueNode)
 Creates bucket-type handle. More...
 

Private Attributes

union {
   std::pair< std::size_t, HotQueueNode< V, P > * >   bucketHandle
 Handle to bucket element (bucket index and list iterator). More...
 
   HeapHandle   heapHandle
 Handle to underlying heap. More...
 
}; 
 
enum ogdf::HotQueueHandle::Type type
 Union tag. More...
 

Friends

template<typename V1 , typename P1 , template< typename T, typename C > class H1>
class HotQueue
 

Detailed Description

template<typename V, typename P, typename HeapHandle>
struct ogdf::HotQueueHandle< V, P, HeapHandle >

Heap-on-Top handle to inserted items.

This structure is essentially just an tagged union of either bucket handle or native handle to underlying heap.

Template Parameters
VDenotes type of values of inserted elements.
PDenotes type of priorities of inserted elements.
HeapHandleDenotes type of handle of underlying heap.

Definition at line 76 of file HotQueue.h.

Member Enumeration Documentation

◆ Type

template<typename V , typename P , typename HeapHandle >
enum ogdf::HotQueueHandle::Type
strongprivate
Enumerator
heap 
bucket 

Definition at line 78 of file HotQueue.h.

Constructor & Destructor Documentation

◆ HotQueueHandle() [1/3]

template<typename V , typename P , typename HeapHandle >
ogdf::HotQueueHandle< V, P, HeapHandle >::HotQueueHandle ( HeapHandle  handle)
inlineprivate

Creates heap-type handle.

Definition at line 91 of file HotQueue.h.

◆ HotQueueHandle() [2/3]

template<typename V , typename P , typename HeapHandle >
ogdf::HotQueueHandle< V, P, HeapHandle >::HotQueueHandle ( std::size_t  index,
HotQueueNode< V, P > *  queueNode 
)
inlineprivate

Creates bucket-type handle.

Definition at line 97 of file HotQueue.h.

◆ HotQueueHandle() [3/3]

template<typename V , typename P , typename HeapHandle >
ogdf::HotQueueHandle< V, P, HeapHandle >::HotQueueHandle ( const HotQueueHandle< V, P, HeapHandle > &  other)
inline

Definition at line 103 of file HotQueue.h.

Member Function Documentation

◆ operator=()

template<typename V , typename P , typename HeapHandle >
HotQueueHandle& ogdf::HotQueueHandle< V, P, HeapHandle >::operator= ( const HotQueueHandle< V, P, HeapHandle > &  other)
inline

Definition at line 107 of file HotQueue.h.

Friends And Related Function Documentation

◆ HotQueue

template<typename V , typename P , typename HeapHandle >
template<typename V1 , typename P1 , template< typename T, typename C > class H1>
friend class HotQueue
friend

Definition at line 124 of file HotQueue.h.

Member Data Documentation

◆ @1

union { ... }

◆ bucketHandle

template<typename V , typename P , typename HeapHandle >
std::pair<std::size_t, HotQueueNode<V, P> *> ogdf::HotQueueHandle< V, P, HeapHandle >::bucketHandle

Handle to bucket element (bucket index and list iterator).

Definition at line 87 of file HotQueue.h.

◆ heapHandle

template<typename V , typename P , typename HeapHandle >
HeapHandle ogdf::HotQueueHandle< V, P, HeapHandle >::heapHandle

Handle to underlying heap.

Definition at line 85 of file HotQueue.h.

◆ type

template<typename V , typename P , typename HeapHandle >
enum ogdf::HotQueueHandle::Type ogdf::HotQueueHandle< V, P, HeapHandle >::type
private

Union tag.


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