Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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.
 
 Element (int height)
 Creates a dummy (stop) element with given height.
 
 ~Element ()
 Destructor.
 
void grow (int newHeight)
 Increases the element's height to newHeight.
 

Public Attributes

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

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 82 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 93 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 101 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 107 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 76 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 75 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 74 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 78 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 79 of file SortedSequence.h.


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