Public Types | Public Member Functions | Public Attributes | Private Attributes

MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1 Class Reference

const_iterator More...

#include <CSAutoAccessSSkipList.h>

List of all members.

Public Types

typedef std::iterator
< std::random_access_iterator_tag,
value_type > 
baseclass
typedef
std::random_acces_iterator_tag 
iterator_category
typedef baseclass::value_type value_type
typedef const
baseclass::value_type * 
pointer
typedef const
baseclass::value_type & 
reference
typedef ptrdiff_t difference_type

Public Member Functions

 T1 ()
 Default constructor. O(1) (Trivial Iterator)
 T1 (const T1 &t1)
 Copy constructor. O(1) (Output Iterator)
 T1 (const T0 &t0)
 Copy constructor. O(1) (Output Iterator)
 T1 (container_type *container, node_type *p)
 Custom constructor. O(logn)
 T1 (container_type *container, node_type *p, size_type index)
 Custom constructor. O(1)
bool operator== (const T0 &other) const
 Equality Operator. O(1) (Trivial Iterator)
bool operator!= (const T0 &other) const
 Not Equal Operator. O(1) (Trivial Iterator)
bool operator== (const T1 &other) const
 Equality Operator. O(1) (Trivial Iterator)
bool operator!= (const T1 &other) const
 Not Equal Operator. O(1) (Trivial Iterator)
T1operator++ ()
 Pre Increment Operator. O(1) (Forward Iterator)
T1 operator++ (int)
 Post Increment Operator. O(1) (Forward Iterator)
T1operator-- ()
 Pre Decrement Operator. O(logn) (Bidirectional Iterator LOGN)
T1 operator-- (int)
 Post Decrement Operator. O(logn) (Bidirectional Iterator LOGN)
reference operator* () const
 Dereference Operator. O(1) (Trivial Iterator)
pointer operator-> () const
 Pointer Operator. O(1) (Trivial Iterator)
bool operator< (const T0 &other) const
 LessThan Operator. O(1) (Arbitrary Access Iterator LOGN)
bool operator<= (const T0 &other) const
 LessThanOrEqual Operator. O(1) (Arbitrary Access Iterator LOGN)
bool operator> (const T0 &other) const
 GreaterThan Operator. O(1) (Arbitrary Access Iterator LOGN)
bool operator>= (const T0 &other) const
 GreaterThanOrEqual Operator. O(1) (Arbitrary Access Iterator LOGN)
bool operator< (const T1 &other) const
 LessThan Operator. O(1) (Arbitrary Access Iterator LOGN)
bool operator<= (const T1 &other) const
 LessThanOrEqual Operator. O(1) (Arbitrary Access Iterator LOGN)
bool operator> (const T1 &other) const
 GreaterThan Operator. O(1) (Arbitrary Access Iterator LOGN)
bool operator>= (const T1 &other) const
 GreaterThanOrEqual Operator. O(1) (Arbitrary Access Iterator LOGN)
T1 operator+ (difference_type off) const
 Add Operator. O(logn) (Arbitrary Access Iterator LOGN)
T1 operator- (difference_type off) const
 Subtract Operator. O(logn) (Arbitrary Access Iterator LOGN)
T1operator+= (difference_type off)
 AddEqual Operator. O(logn) (Arbitrary Access Iterator LOGN)
T1operator-= (difference_type off)
 SubtractEqual Operator. O(logn) (Arbitrary Access Iterator LOGN)
difference_type operator- (const T0 &other) const
 Subtract iterator Operator. O(1) (Arbitrary Access Iterator LOGN)
difference_type operator- (const T1 &other) const
 Subtract iterator Operator. O(1) (Arbitrary Access Iterator LOGN)
int refresh ()
 Recalculates iterator index. O(logn)
value_type & operator[] (difference_type off) const
 Array Operator. O(logn) (Arbitrary Access Iterator LOGN)
size_type getIndex () const
 Get current index. O(1)

Public Attributes

friend T0
friend container_type

Private Attributes

const container_typecontainer
 SkipList container.
size_type Findex
 Index of this iterator.
const node_typenode
 Node pointed to by this iterator.

Detailed Description

template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
class MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1

const_iterator

const_iterator for MultiAutoAccessSSkipList


Constructor & Destructor Documentation

template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::T1 ( const T1 t1) [inline]

Copy constructor. O(1) (Output Iterator)

Parameters:
t1iterator to copy.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::T1 ( const T0 t0) [inline]

Copy constructor. O(1) (Output Iterator)

Parameters:
t0const_iterator to copy.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::T1 ( container_type container,
node_type p 
) [inline]

Custom constructor. O(logn)

Perfarmance: Index is automatically generated in O(logn).

Parameters:
containerSkipList that contains the current node.
pNode pointed to by this iterator.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::T1 ( container_type container,
node_type p,
size_type  index 
) [inline]

Custom constructor. O(1)

Parameters:
containerSkipList that contains the current node.
pNode pointed to by this iterator.
indexIndexd of the current node.

Member Function Documentation

template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator== ( const T0 other) const [inline]

Equality Operator. O(1) (Trivial Iterator)

Parameters:
otheriterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator!= ( const T0 other) const [inline]

Not Equal Operator. O(1) (Trivial Iterator)

Parameters:
otheriterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator== ( const T1 other) const [inline]

Equality Operator. O(1) (Trivial Iterator)

Parameters:
otherconst_iterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator!= ( const T1 other) const [inline]

Not Equal Operator. O(1) (Trivial Iterator)

Parameters:
otherconst_iterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
T1& MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator++ ( ) [inline]

Pre Increment Operator. O(1) (Forward Iterator)

const_iterator points to next node in the list.

Returns:
self reference to const_iterator after being incremented.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
T1 MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator++ ( int  ) [inline]

Post Increment Operator. O(1) (Forward Iterator)

const_iterator points to next node in the list.

Returns:
incremented copy of const_iterator.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
T1& MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator-- ( ) [inline]

Pre Decrement Operator. O(logn) (Bidirectional Iterator LOGN)

const_iterator points to previous node in the list.

Returns:
self reference to const_iterator after being decremented.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
T1 MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator-- ( int  ) [inline]

Post Decrement Operator. O(logn) (Bidirectional Iterator LOGN)

const_iterator points to previous node in the list.

Returns:
decremented copy of const_iterator.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
reference MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator* ( ) const [inline]

Dereference Operator. O(1) (Trivial Iterator)

Gain access to value that the const_iterator points to.

Returns:
Value reference pointed to by this const_iterator.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
pointer MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator-> ( ) const [inline]

Pointer Operator. O(1) (Trivial Iterator)

Gain access to members of of the value pointed to by this const_iterator.

Returns:
Value pointer pointed to by this const_iterator.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator< ( const T0 other) const [inline]

LessThan Operator. O(1) (Arbitrary Access Iterator LOGN)

Parameters:
otheriterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator<= ( const T0 other) const [inline]

LessThanOrEqual Operator. O(1) (Arbitrary Access Iterator LOGN)

Parameters:
otheriterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator> ( const T0 other) const [inline]

GreaterThan Operator. O(1) (Arbitrary Access Iterator LOGN)

Parameters:
otheriterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator>= ( const T0 other) const [inline]

GreaterThanOrEqual Operator. O(1) (Arbitrary Access Iterator LOGN)

Parameters:
otheriterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator< ( const T1 other) const [inline]

LessThan Operator. O(1) (Arbitrary Access Iterator LOGN)

Parameters:
otherconst_iterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator<= ( const T1 other) const [inline]

LessThanOrEqual Operator. O(1) (Arbitrary Access Iterator LOGN)

Parameters:
otherconst_iterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator> ( const T1 other) const [inline]

GreaterThan Operator. O(1) (Arbitrary Access Iterator LOGN)

Parameters:
otherconst_iterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
bool MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator>= ( const T1 other) const [inline]

GreaterThanOrEqual Operator. O(1) (Arbitrary Access Iterator LOGN)

Parameters:
otherconst_iterator to compare against.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
T1 MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator+ ( difference_type  off) const [inline]

Add Operator. O(logn) (Arbitrary Access Iterator LOGN)

Parameters:
offoffset from current index.
Returns:
const_iterator that points to the new location.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
T1 MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator- ( difference_type  off) const [inline]

Subtract Operator. O(logn) (Arbitrary Access Iterator LOGN)

Parameters:
offnegative offset from current index.
Returns:
const_iterator that points to the new location.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
T1& MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator+= ( difference_type  off) [inline]

AddEqual Operator. O(logn) (Arbitrary Access Iterator LOGN)

Parameters:
offoffset from current index.
Returns:
const_iterator that points to the new location.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
T1& MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator-= ( difference_type  off) [inline]

SubtractEqual Operator. O(logn) (Arbitrary Access Iterator LOGN)

Parameters:
offnegative offset from current index.
Returns:
const_iterator that points to the new location.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
difference_type MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator- ( const T0 other) const [inline]

Subtract iterator Operator. O(1) (Arbitrary Access Iterator LOGN)

Parameters:
otherconst_iterator position to subtract.
Returns:
Distance between iterators.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
difference_type MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator- ( const T1 other) const [inline]

Subtract iterator Operator. O(1) (Arbitrary Access Iterator LOGN)

Parameters:
otheriterator position to subtract.
Returns:
Distance between iterators.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
int MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::refresh ( ) [inline]

Recalculates iterator index. O(logn)

Use refresh() to recalculate index after performing a destructive operation on the SkipList.

Returns:
Corrected index.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
value_type& MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::operator[] ( difference_type  off) const [inline]

Array Operator. O(logn) (Arbitrary Access Iterator LOGN)

Parameters:
offoffset from current index.
Returns:
reference to value at the new location.
template<class K, class T, class A = XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG>
size_type MultiAutoAccessSSkipList< K, T, A, Pr, R >::T1::getIndex ( ) const [inline]

Get current index. O(1)

Returns:
Current index.

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