Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::SortedSequence< KEY, INFO, CMP >::Element Struct Reference

Internal structure to hold the items and internal forward/backward pointers of the skiplist. More...

Public Member Functions

 Element (const Element &)=delete
 
 Element (const KEY &key, const INFO &info, int height)
 Creates a skiplist element for(key,info) and given height. More...
 
 Element (int height)
 Creates a dummy (stop) element with given height. More...
 
 ~Element ()
 Destructor. More...
 
void grow (int newHeight)
 Increases the element's height to newHeight. More...
 

Public Attributes

int m_height
 the height of the skiplist element. More...
 
INFO m_info
 stores the associated information. More...
 
KEY m_key
 stores the key. More...
 
Element ** m_next
 array of successor elements. More...
 
Element ** m_prev
 array of predecessor elements. More...
 

Detailed Description

template<class KEY, class INFO, class CMP = StdComparer<KEY>>
struct ogdf::SortedSequence< KEY, INFO, CMP >::Element

Internal structure to hold the items and internal forward/backward pointers of the skiplist.

Definition at line 73 of file SortedSequence.h.

Constructor & Destructor Documentation

◆ Element() [1/3]

template<class KEY , class INFO , class CMP = StdComparer<KEY>>
ogdf::SortedSequence< KEY, INFO, CMP >::Element::Element ( const KEY &  key,
const INFO &  info,
int  height 
)
inline

Creates a skiplist element for(key,info) and given height.

Definition at line 83 of file SortedSequence.h.

◆ Element() [2/3]

template<class KEY , class INFO , class CMP = StdComparer<KEY>>
ogdf::SortedSequence< KEY, INFO, CMP >::Element::Element ( int  height)
inline

Creates a dummy (stop) element with given height.

Stop elements are marked with height 0, although this is not their real height. It is not necessary to store that, as we use realloc to increase their height.

Definition at line 95 of file SortedSequence.h.

◆ Element() [3/3]

template<class KEY , class INFO , class CMP = StdComparer<KEY>>
ogdf::SortedSequence< KEY, INFO, CMP >::Element::Element ( const Element )
delete

◆ ~Element()

template<class KEY , class INFO , class CMP = StdComparer<KEY>>
ogdf::SortedSequence< KEY, INFO, CMP >::Element::~Element ( )
inline

Destructor.

Definition at line 104 of file SortedSequence.h.

Member Function Documentation

◆ grow()

template<class KEY , class INFO , class CMP = StdComparer<KEY>>
void ogdf::SortedSequence< KEY, INFO, CMP >::Element::grow ( int  newHeight)
inline

Increases the element's height to newHeight.

Definition at line 110 of file SortedSequence.h.

Member Data Documentation

◆ m_height

template<class KEY , class INFO , class CMP = StdComparer<KEY>>
int ogdf::SortedSequence< KEY, INFO, CMP >::Element::m_height

the height of the skiplist element.

Definition at line 77 of file SortedSequence.h.

◆ m_info

template<class KEY , class INFO , class CMP = StdComparer<KEY>>
INFO ogdf::SortedSequence< KEY, INFO, CMP >::Element::m_info

stores the associated information.

Definition at line 76 of file SortedSequence.h.

◆ m_key

template<class KEY , class INFO , class CMP = StdComparer<KEY>>
KEY ogdf::SortedSequence< KEY, INFO, CMP >::Element::m_key

stores the key.

Definition at line 75 of file SortedSequence.h.

◆ m_next

template<class KEY , class INFO , class CMP = StdComparer<KEY>>
Element** ogdf::SortedSequence< KEY, INFO, CMP >::Element::m_next

array of successor elements.

Definition at line 79 of file SortedSequence.h.

◆ m_prev

template<class KEY , class INFO , class CMP = StdComparer<KEY>>
Element** ogdf::SortedSequence< KEY, INFO, CMP >::Element::m_prev

array of predecessor elements.

Definition at line 80 of file SortedSequence.h.


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