Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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 class  Type { heap , bucket }
 

Private Member Functions

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

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.
 

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 68 of file HotQueue.h.

Member Enumeration Documentation

◆ Type

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

Definition at line 70 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 80 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 83 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 87 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 89 of file HotQueue.h.

Friends And Related Symbol 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 104 of file HotQueue.h.

Member Data Documentation

◆ [union]

union { ... } ogdf::HotQueueHandle< V, P, HeapHandle >

◆ 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 76 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 74 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: