Classes | Public Types | Public Member Functions | Public Attributes

XBidiNode< T, N, S > Class Template Reference

Internal Bidirection Node used with XBidiCompositeSkipList. More...

#include <CSCompositeSkipList.h>

List of all members.

Classes

struct  Pointers
 Structure to store forward and backward pointers including skip amounts. More...

Public Types

typedef size_t size_type
 An unsigned integral type that can represent any nonnegative value of the container's distance type.
typedef Pointers ptr_type
 Type for skiplist pointers.

Public Member Functions

XBidiNode< T, N, S > *& forward (unsigned int ptr_type, unsigned int level)
 Returns next node at a given level and internal container index.
XBidiNode< T, N, S > *& backward (unsigned int ptr_type, unsigned int level)
 Returns previous node at a given level and internal container index.
size_typeskip (unsigned int ptr_type, unsigned int level)
 Returns skip amount at a given level and internal container index.
XBidiNode< T, N, S > * forward (unsigned int ptr_type, unsigned int level) const
 Returns next node at a given level and internal container index.
XBidiNode< T, N, S > * backward (unsigned int ptr_type, unsigned int level) const
 Returns previous node at a given level and internal container index.
size_type skip (unsigned int ptr_type, unsigned int level) const
 Returns skip amount at a given level and internal container index.
 XBidiNode (unsigned int level, const T obj)
 Custom Constructor.
 XBidiNode (unsigned int level)
 Custom Constructor.
unsigned int getListCount () const
 Total number of internal containers.
unsigned int getIndexCount () const
 Index of first non-indexed sorted internal container.

Public Attributes

object
 Object stored in this node.
unsigned int level
 How many forward and backward pointer levels there are.
ptr_type pointers [1]
 Levels of pointers. Extra levels allocated beyond end of node.

Detailed Description

template<class T, unsigned int N = 1, unsigned int S = 0>
class XBidiNode< T, N, S >

Internal Bidirection Node used with XBidiCompositeSkipList.

Internal containers also use this node. DON'T LOOK!!!

Template Parameters:
TType of object stored as an element in the container.
NThe total number of internal containers.
SThe index of the first non-indexed, sorted container.

Constructor & Destructor Documentation

template<class T , unsigned int N = 1, unsigned int S = 0>
XBidiNode< T, N, S >::XBidiNode ( unsigned int  level,
const T  obj 
) [inline]

Custom Constructor.

Parameters:
levelNumber of levels in this node.
objCopy of object to store in this node.
template<class T , unsigned int N = 1, unsigned int S = 0>
XBidiNode< T, N, S >::XBidiNode ( unsigned int  level) [inline]

Custom Constructor.

Default object element will be created in this node.

Parameters:
levelNumber of levels in this node.

Member Function Documentation

template<class T , unsigned int N = 1, unsigned int S = 0>
XBidiNode<T,N,S>*& XBidiNode< T, N, S >::forward ( unsigned int  ptr_type,
unsigned int  level 
) [inline]

Returns next node at a given level and internal container index.

/param ptr_type Internal container index. /param level Level requested. /returns Next node at given level in selected internal container.

template<class T , unsigned int N = 1, unsigned int S = 0>
XBidiNode<T,N,S>*& XBidiNode< T, N, S >::backward ( unsigned int  ptr_type,
unsigned int  level 
) [inline]

Returns previous node at a given level and internal container index.

/param ptr_type Internal container index. /param level Level requested. /returns Previous node at given level in selected internal container.

template<class T , unsigned int N = 1, unsigned int S = 0>
size_type& XBidiNode< T, N, S >::skip ( unsigned int  ptr_type,
unsigned int  level 
) [inline]

Returns skip amount at a given level and internal container index.

This gives the amount of nodes at level 0 skipped over if we go to the very next node on this level.

/param ptr_type Internal container index. /param level Level requested. /returns Forward skip amount at given level in selected internal container.

template<class T , unsigned int N = 1, unsigned int S = 0>
XBidiNode<T,N,S>* XBidiNode< T, N, S >::forward ( unsigned int  ptr_type,
unsigned int  level 
) const [inline]

Returns next node at a given level and internal container index.

/param ptr_type Internal container index. /param level Level requested. /returns Next node at given level in selected internal container.

template<class T , unsigned int N = 1, unsigned int S = 0>
XBidiNode<T,N,S>* XBidiNode< T, N, S >::backward ( unsigned int  ptr_type,
unsigned int  level 
) const [inline]

Returns previous node at a given level and internal container index.

/param ptr_type Internal container index. /param level Level requested. /returns Previous node at given level in selected internal container.

template<class T , unsigned int N = 1, unsigned int S = 0>
size_type XBidiNode< T, N, S >::skip ( unsigned int  ptr_type,
unsigned int  level 
) const [inline]

Returns skip amount at a given level and internal container index.

This gives the amount of nodes at level 0 skipped over if we go to the very next node on this level.

/param ptr_type Internal container index. /param level Level requested. /returns Forward skip amount at given level in selected internal container.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs