Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::SkipList< Key, Type >::Node Class Reference

#include <tpl_skipList.H>

Inheritance diagram for Aleph::SkipList< Key, Type >::Node:
[legend]
Collaboration diagram for Aleph::SkipList< Key, Type >::Node:
[legend]

Public Member Functions

 Node (const Key &_key, const Type &_data, int n)
 
 Node (const Key &_key, int n)
 
 Node (const int n)
 
 Node ()
 
 ~Node ()=default
 
Nodeget_next () const noexcept
 
Node *& getForward (int i)
 
Node ** getForward ()
 
const Key & get_key () const noexcept
 
Key & get_key () noexcept
 
const Typeget_data () const noexcept
 
Typeget_data () noexcept
 
int getLevel () const noexcept
 

Static Public Member Functions

static Key computeMaxKey () noexcept
 Compute the maximum possible key value (used for sentinel).
 

Protected Attributes

int level
 
Nodeforward [0]
 

Static Protected Attributes

static Node nodeSentinel
 
static NodeNullPtr
 

Private Member Functions

Node ** forward_ptr () noexcept
 
Node *constforward_ptr () const noexcept
 
void fillForwardnullptr ()
 

Private Attributes

Key key
 
Type data = Type()
 

Friends

class SkipList< Key, Type >
 

Detailed Description

template<class Key, class Type>
class Aleph::SkipList< Key, Type >::Node

Definition at line 102 of file tpl_skipList.H.

Constructor & Destructor Documentation

◆ Node() [1/4]

template<class Key , class Type >
Aleph::SkipList< Key, Type >::Node::Node ( const Key &  _key,
const Type _data,
int  n 
)
inline

Definition at line 140 of file tpl_skipList.H.

◆ Node() [2/4]

template<class Key , class Type >
Aleph::SkipList< Key, Type >::Node::Node ( const Key &  _key,
int  n 
)
inline

Definition at line 148 of file tpl_skipList.H.

◆ Node() [3/4]

template<class Key , class Type >
Aleph::SkipList< Key, Type >::Node::Node ( const int  n)
inline

Definition at line 155 of file tpl_skipList.H.

◆ Node() [4/4]

template<class Key , class Type >
Aleph::SkipList< Key, Type >::Node::Node ( )
inline

Definition at line 161 of file tpl_skipList.H.

◆ ~Node()

template<class Key , class Type >
Aleph::SkipList< Key, Type >::Node::~Node ( )
default

Member Function Documentation

◆ computeMaxKey()

template<class Key , class Type >
static Key Aleph::SkipList< Key, Type >::Node::computeMaxKey ( )
staticnoexcept

Compute the maximum possible key value (used for sentinel).

Note
Must be specialized for each Key type.

◆ fillForwardnullptr()

◆ forward_ptr() [1/2]

template<class Key , class Type >
Node *const * Aleph::SkipList< Key, Type >::Node::forward_ptr ( ) const
inlineprivatenoexcept

Definition at line 125 of file tpl_skipList.H.

◆ forward_ptr() [2/2]

◆ get_data() [1/2]

template<class Key , class Type >
const Type & Aleph::SkipList< Key, Type >::Node::get_data ( ) const
inlinenoexcept

Definition at line 191 of file tpl_skipList.H.

References Aleph::SkipList< Key, Type >::Node::data.

◆ get_data() [2/2]

template<class Key , class Type >
Type & Aleph::SkipList< Key, Type >::Node::get_data ( )
inlinenoexcept

Definition at line 193 of file tpl_skipList.H.

References Aleph::SkipList< Key, Type >::Node::data.

◆ get_key() [1/2]

◆ get_key() [2/2]

template<class Key , class Type >
Key & Aleph::SkipList< Key, Type >::Node::get_key ( )
inlinenoexcept

Definition at line 189 of file tpl_skipList.H.

References Aleph::SkipList< Key, Type >::Node::key.

◆ get_next()

◆ getForward() [1/2]

template<class Key , class Type >
Node ** Aleph::SkipList< Key, Type >::Node::getForward ( )
inline

◆ getForward() [2/2]

◆ getLevel()

template<class Key , class Type >
int Aleph::SkipList< Key, Type >::Node::getLevel ( ) const
inlinenoexcept

Friends And Related Symbol Documentation

◆ SkipList< Key, Type >

template<class Key , class Type >
friend class SkipList< Key, Type >
friend

Definition at line 131 of file tpl_skipList.H.

Member Data Documentation

◆ data

template<class Key , class Type >
Type Aleph::SkipList< Key, Type >::Node::data = Type()
private

◆ forward

template<class Key , class Type >
Node* Aleph::SkipList< Key, Type >::Node::forward[0]
protected

Definition at line 202 of file tpl_skipList.H.

◆ key

template<class Key , class Type >
Key Aleph::SkipList< Key, Type >::Node::key
private

◆ level

◆ nodeSentinel

template<class Key , class Type >
SkipList< Key, Type >::Node Aleph::SkipList< Key, Type >::Node::nodeSentinel
staticprotected

◆ NullPtr

template<class Key , class Type >
SkipList< Key, Type >::Node * Aleph::SkipList< Key, Type >::Node::NullPtr
staticprotected
Initial value:
=
&SkipList<Key, Type>::Node::nodeSentinel

Definition at line 114 of file tpl_skipList.H.

Referenced by Aleph::SkipList< Key, Type >::Node::get_next().


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