Random Access LOGN Iterator for XIndexedSkipList and XMultiAutoSkipList. More...
#include <CSCompositeSkipList.h>
Public Types | |
typedef std::iterator < std::random_access_iterator_tag, typename container_type::value_type > | baseclass |
typedef baseclass::iterator_category | iterator_category |
typedef baseclass::value_type | value_type |
typedef baseclass::difference_type | difference_type |
typedef baseclass::pointer | pointer |
typedef baseclass::reference | reference |
typedef container_type::data_type | data_type |
typedef container_type::node_type | node_type |
typedef container_type::size_type | size_type |
typedef container_type::mapped_type | mapped_type |
typedef container_type::const_mapped_type | const_mapped_type |
typedef container_type::mapped_type_reference | mapped_type_reference |
typedef container_type::const_mapped_type_reference | const_mapped_type_reference |
typedef container_type::T0 | T0 |
typedef container_type::T1 | T1 |
typedef XIterator0< X, container_type > | self_type |
Public Member Functions | |
XIterator0 () | |
Default constructor. O(1) (Trivial Iterator) | |
XIterator0 (const T0 &t0) | |
Copy constructor. O(1) (Output Iterator) | |
XIterator0 (const T1 &t1) | |
Copy constructor. O(1) (Output Iterator) | |
XIterator0 (data_type *data, node_type *p) | |
Custom constructor. O(logn) | |
XIterator0 (data_type *data, node_type *p, size_type index) | |
Custom constructor. O(1) | |
template<unsigned int nX, class ncontainer_type > | |
XIterator0 (const XIterator0< nX, ncontainer_type > &t0) | |
Conversion constructor. O(logn) | |
template<unsigned int nX, class ncontainer_type > | |
XIterator0 (const XIterator1< nX, ncontainer_type > &t1) | |
Conversion constructor. O(logn) | |
template<unsigned int nX, class ncontainer_type > | |
XIterator0 (const YIterator0< nX, ncontainer_type > &t0) | |
Conversion constructor. O(logn) | |
template<unsigned int nX, class ncontainer_type > | |
XIterator0 (const YIterator1< nX, ncontainer_type > &t1) | |
Conversion constructor. O(logn) | |
template<unsigned int nX, class ncontainer_type > | |
T0 & | operator= (const XIterator0< nX, ncontainer_type > &t0) |
Assignment operator. O(logn) | |
template<unsigned int nX, class ncontainer_type > | |
T0 & | operator= (const XIterator1< nX, ncontainer_type > &t1) |
Assignment operator. O(logn) | |
template<unsigned int nX, class ncontainer_type > | |
T0 & | operator= (const YIterator0< nX, ncontainer_type > &t0) |
Assignment operator. O(logn) | |
template<unsigned int nX, class ncontainer_type > | |
T0 & | operator= (const YIterator1< nX, ncontainer_type > &t1) |
Assignment operator. O(logn) | |
node_type * | getNode () const |
Returns internal node. Only use for converting iterators. O(1) | |
void | setNode (node_type *n) |
Set internal node. Internal use only. O(1) | |
container_type * | getContainer () const |
Get current container for this iterator. 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) | |
T0 & | operator++ () |
Pre Increment Operator. O(1) (Forward Iterator) | |
T0 | operator++ (int) |
Post Increment Operator. O(1) (Forward Iterator) | |
T0 & | operator-- () |
Pre Decrement Operator. O(1) (Bidirectional Iterator) | |
T0 | operator-- (int) |
Post Decrement Operator. O(1) (Bidirectional Iterator) | |
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) (Random Access Iterator LOGN) | |
bool | operator<= (const T0 &other) const |
LessThanOrEqual Operator. O(1) (Random Access Iterator LOGN) | |
bool | operator> (const T0 &other) const |
GreaterThan Operator. O(1) (Random Access Iterator LOGN) | |
bool | operator>= (const T0 &other) const |
GreaterThanOrEqual Operator. O(1) (Random Access Iterator LOGN) | |
bool | operator< (const T1 &other) const |
LessThan Operator. O(1) (Random Access Iterator LOGN) | |
bool | operator<= (const T1 &other) const |
LessThanOrEqual Operator. O(1) (Random Access Iterator LOGN) | |
bool | operator> (const T1 &other) const |
GreaterThan Operator. O(1) (Random Access Iterator LOGN) | |
bool | operator>= (const T1 &other) const |
GreaterThanOrEqual Operator. O(1) (Random Access Iterator LOGN) | |
T0 | operator+ (difference_type off) const |
Add Operator. O(logn) (Random Access Iterator LOGN) | |
T0 | operator- (difference_type off) const |
Subtract Operator. O(logn) (Random Access Iterator LOGN) | |
T0 & | operator+= (difference_type off) |
AddEqual Operator. O(logn) (Random Access Iterator LOGN) | |
T0 & | operator-= (difference_type off) |
SubtractEqual Operator. O(logn) (Random Access Iterator LOGN) | |
difference_type | operator- (const T0 &other) const |
Subtract iterator Operator. O(1) (Random Access Iterator LOGN) | |
difference_type | operator- (const T1 &other) const |
Subtract iterator Operator. O(1) (Random Access Iterator LOGN) | |
size_type | refresh () |
Recalculates iterator index. O(logn) | |
value_type & | operator[] (difference_type off) const |
Array Operator. O(logn) (Random Access Iterator LOGN) | |
size_type | getIndex () const |
Get current index. O(1) | |
Public Attributes | |
size_type | index |
Property for internal container index within node_type. (READ-ONLY) | |
Private Attributes | |
data_type * | data |
Shared data where list is stored. | |
size_type | Findex |
Index of this iterator. | |
node_type * | FNode |
Node pointed to by this iterator. |
Random Access LOGN Iterator for XIndexedSkipList and XMultiAutoSkipList.
Iterators after a deletion or insertion are invalidated (and only for iterators following the inserted or deleted location), but can be revalidated by calling refresh() on the iterator. Iterator preceding the inserted or deleted location remain valid.
The following operations are always valid even on invalidated iterators of this type.
X | Index of the internal container within data_type for this iterator. |
container_type | Type that represents the internal container for this iterator. |
XIterator0< X, container_type >::XIterator0 | ( | const T0 & | t0 | ) | [inline] |
Copy constructor. O(1) (Output Iterator)
t0 | iterator to copy. |
XIterator0< X, container_type >::XIterator0 | ( | const T1 & | t1 | ) | [inline] |
Copy constructor. O(1) (Output Iterator)
t1 | const_iterator to copy. |
XIterator0< X, container_type >::XIterator0 | ( | data_type * | data, |
node_type * | p | ||
) | [inline] |
Custom constructor. O(logn)
Performance: Index is automatically generated in O(logn).
data | Shared data that contains all the elements. |
p | Node pointed to by this iterator. |
XIterator0< X, container_type >::XIterator0 | ( | data_type * | data, |
node_type * | p, | ||
size_type | index | ||
) | [inline] |
Custom constructor. O(1)
Performance: Index is automatically generated in O(logn).
data | Shared data that contains all the elements. |
p | Node pointed to by this iterator. |
index | Index of the current node. |
XIterator0< X, container_type >::XIterator0 | ( | const XIterator0< nX, ncontainer_type > & | t0 | ) | [inline] |
Conversion constructor. O(logn)
Converts an iterator from another delegate container within the same composite container.
nX | Index of the other delegate container for t0 . |
ncontainer_type | Type that represents the other delegate container for t0 . |
t0 | Iterator to convert. |
XIterator0< X, container_type >::XIterator0 | ( | const XIterator1< nX, ncontainer_type > & | t1 | ) | [inline] |
Conversion constructor. O(logn)
Converts a const_iterator from another delegate container within the same composite container.
nX | Index of the other delegate container for t0 . |
ncontainer_type | Type that represents the other delegate container for t0 . |
t1 | Const_iterator to convert. |
XIterator0< X, container_type >::XIterator0 | ( | const YIterator0< nX, ncontainer_type > & | t0 | ) | [inline] |
Conversion constructor. O(logn)
Converts an iterator from another delegate container within the same composite container.
nX | Index of the other delegate container for t0 . |
ncontainer_type | Type that represents the other delegate container for t0 . |
t0 | Iterator to convert. |
XIterator0< X, container_type >::XIterator0 | ( | const YIterator1< nX, ncontainer_type > & | t1 | ) | [inline] |
Conversion constructor. O(logn)
Converts a const_iterator from another delegate container within the same composite container.
nX | Index of the other delegate container for t0 . |
ncontainer_type | Type that represents the other delegate container for t0 . |
t1 | Const_iterator to convert. |
T0& XIterator0< X, container_type >::operator= | ( | const XIterator0< nX, ncontainer_type > & | t0 | ) | [inline] |
Assignment operator. O(logn)
Converts an iterator from another delegate container within the same composite container.
nX | Index of the other delegate container for t0 . |
ncontainer_type | Type that represents the other delegate container for t0 . |
t0 | Iterator to convert. |
T0& XIterator0< X, container_type >::operator= | ( | const XIterator1< nX, ncontainer_type > & | t1 | ) | [inline] |
Assignment operator. O(logn)
Converts a const_iterator from another delegate container within the same composite container.
nX | Index of the other delegate container for t0 . |
ncontainer_type | Type that represents the other delegate container for t0 . |
t1 | Const_iterator to convert. |
T0& XIterator0< X, container_type >::operator= | ( | const YIterator0< nX, ncontainer_type > & | t0 | ) | [inline] |
Assignment operator. O(logn)
Converts an iterator from another delegate container within the same composite container.
nX | Index of the other delegate container for t0 . |
ncontainer_type | Type that represents the other delegate container for t0 . |
t0 | Iterator to convert. |
T0& XIterator0< X, container_type >::operator= | ( | const YIterator1< nX, ncontainer_type > & | t1 | ) | [inline] |
Assignment operator. O(logn)
Converts a const_iterator from another delegate container within the same composite container.
nX | Index of the other delegate container for t0 . |
ncontainer_type | Type that represents the other delegate container for t0 . |
t1 | Const_iterator to convert. |
bool XIterator0< X, container_type >::operator== | ( | const T0 & | other | ) | const [inline] |
Equality Operator. O(1) (Trivial Iterator)
other | iterator to compare against. |
bool XIterator0< X, container_type >::operator!= | ( | const T0 & | other | ) | const [inline] |
Not Equal Operator. O(1) (Trivial Iterator)
other | iterator to compare against. |
bool XIterator0< X, container_type >::operator== | ( | const T1 & | other | ) | const [inline] |
Equality Operator. O(1) (Trivial Iterator)
other | const_iterator to compare against. |
bool XIterator0< X, container_type >::operator!= | ( | const T1 & | other | ) | const [inline] |
Not Equal Operator. O(1) (Trivial Iterator)
other | const_iterator to compare against. |
T0& XIterator0< X, container_type >::operator++ | ( | ) | [inline] |
Pre Increment Operator. O(1) (Forward Iterator)
iterator points to next node in the list.
T0 XIterator0< X, container_type >::operator++ | ( | int | ) | [inline] |
Post Increment Operator. O(1) (Forward Iterator)
iterator points to next node in the list.
T0& XIterator0< X, container_type >::operator-- | ( | ) | [inline] |
Pre Decrement Operator. O(1) (Bidirectional Iterator)
iterator points to previous node in the list.
T0 XIterator0< X, container_type >::operator-- | ( | int | ) | [inline] |
Post Decrement Operator. O(1) (Bidirectional Iterator)
iterator points to previous node in the list.
reference XIterator0< X, container_type >::operator* | ( | ) | const [inline] |
Dereference Operator. O(1) (Trivial Iterator)
Gain access to value that the iterator points to.
pointer XIterator0< X, container_type >::operator-> | ( | ) | const [inline] |
Pointer Operator. O(1) (Trivial Iterator)
Gain access to members of of the value pointed to by this iterator.
bool XIterator0< X, container_type >::operator< | ( | const T0 & | other | ) | const [inline] |
LessThan Operator. O(1) (Random Access Iterator LOGN)
other | iterator to compare against. |
bool XIterator0< X, container_type >::operator<= | ( | const T0 & | other | ) | const [inline] |
LessThanOrEqual Operator. O(1) (Random Access Iterator LOGN)
other | iterator to compare against. |
bool XIterator0< X, container_type >::operator> | ( | const T0 & | other | ) | const [inline] |
GreaterThan Operator. O(1) (Random Access Iterator LOGN)
other | iterator to compare against. |
bool XIterator0< X, container_type >::operator>= | ( | const T0 & | other | ) | const [inline] |
GreaterThanOrEqual Operator. O(1) (Random Access Iterator LOGN)
other | iterator to compare against. |
bool XIterator0< X, container_type >::operator< | ( | const T1 & | other | ) | const [inline] |
LessThan Operator. O(1) (Random Access Iterator LOGN)
other | const_iterator to compare against. |
bool XIterator0< X, container_type >::operator<= | ( | const T1 & | other | ) | const [inline] |
LessThanOrEqual Operator. O(1) (Random Access Iterator LOGN)
other | const_iterator to compare against. |
bool XIterator0< X, container_type >::operator> | ( | const T1 & | other | ) | const [inline] |
GreaterThan Operator. O(1) (Random Access Iterator LOGN)
other | const_iterator to compare against. |
bool XIterator0< X, container_type >::operator>= | ( | const T1 & | other | ) | const [inline] |
GreaterThanOrEqual Operator. O(1) (Random Access Iterator LOGN)
other | const_iterator to compare against. |
T0 XIterator0< X, container_type >::operator+ | ( | difference_type | off | ) | const [inline] |
Add Operator. O(logn) (Random Access Iterator LOGN)
off | offset from current index. |
T0 XIterator0< X, container_type >::operator- | ( | difference_type | off | ) | const [inline] |
Subtract Operator. O(logn) (Random Access Iterator LOGN)
off | negative offset from current index. |
T0& XIterator0< X, container_type >::operator+= | ( | difference_type | off | ) | [inline] |
AddEqual Operator. O(logn) (Random Access Iterator LOGN)
off | offset from current index. |
T0& XIterator0< X, container_type >::operator-= | ( | difference_type | off | ) | [inline] |
SubtractEqual Operator. O(logn) (Random Access Iterator LOGN)
off | negative offset from current index. |
difference_type XIterator0< X, container_type >::operator- | ( | const T0 & | other | ) | const [inline] |
Subtract iterator Operator. O(1) (Random Access Iterator LOGN)
other | iterator position to subtract. |
difference_type XIterator0< X, container_type >::operator- | ( | const T1 & | other | ) | const [inline] |
Subtract iterator Operator. O(1) (Random Access Iterator LOGN)
other | const_iterator position to subtract. |
size_type XIterator0< X, container_type >::refresh | ( | ) | [inline] |
value_type& XIterator0< X, container_type >::operator[] | ( | difference_type | off | ) | const [inline] |
Array Operator. O(logn) (Random Access Iterator LOGN)
off | offset from current index. |
size_type XIterator0< X, container_type >::getIndex | ( | ) | const [inline] |
Get current index. O(1)