AlgoPlus v0.1.0
Loading...
Searching...
No Matches
splay_tree< T >::Iterator Class Reference

Iterator class. More...

#include <splay_tree.h>

Public Member Functions

 Iterator (const int64_t &index, std::vector< T > &els) noexcept
 Construct a new Iterator object.
Iteratoroperator= (int64_t index)
 = operator for Iterator type
Iteratoroperator++ ()
 operator ++ for type Iterator
Iterator operator++ (int)
 operator ++ for type Iterator
Iteratoroperator-- ()
 operator – for type Iterator
Iterator operator-- (int)
 operator – for type Iterator
bool operator!= (const Iterator &it)
 operator != for type Iterator
operator* ()
 operator * for type Iterator

Detailed Description

template<typename T>
class splay_tree< T >::Iterator

Iterator class.

Constructor & Destructor Documentation

◆ Iterator()

template<typename T>
splay_tree< T >::Iterator::Iterator ( const int64_t & index,
std::vector< T > & els )
inlineexplicitnoexcept

Construct a new Iterator object.

Parameters
elsvector<T> - the elements in inorder fashion

Member Function Documentation

◆ operator!=()

template<typename T>
bool splay_tree< T >::Iterator::operator!= ( const Iterator & it)
inline

operator != for type Iterator

Parameters
itconst Iterator
Returns
true if index == it.index
false otherwise

◆ operator*()

template<typename T>
T splay_tree< T >::Iterator::operator* ( )
inline

operator * for type Iterator

Returns
T the value of the node

◆ operator++() [1/2]

template<typename T>
Iterator & splay_tree< T >::Iterator::operator++ ( )
inline

operator ++ for type Iterator

Returns
Iterator&

◆ operator++() [2/2]

template<typename T>
Iterator splay_tree< T >::Iterator::operator++ ( int )
inline

operator ++ for type Iterator

Returns
Iterator

◆ operator--() [1/2]

template<typename T>
Iterator & splay_tree< T >::Iterator::operator-- ( )
inline

operator – for type Iterator

Returns
Iterator&

◆ operator--() [2/2]

template<typename T>
Iterator splay_tree< T >::Iterator::operator-- ( int )
inline

operator – for type Iterator

Returns
Iterator

◆ operator=()

template<typename T>
Iterator & splay_tree< T >::Iterator::operator= ( int64_t index)
inline

= operator for Iterator type

Parameters
indexthe current index
Returns
Iterator&

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