My Project
Loading...
Searching...
No Matches
HeapUnionFind< V, IM, Comp >::ItemIt Class Reference

Detailed Description

template<typename V, typename IM, typename Comp = std::less<V>>
class lemon::HeapUnionFind< V, IM, Comp >::ItemIt

ClassIt is a lemon style iterator for the components. It iterates on the items of a class. By example if you want to iterate on each items of each classes then you may write the next code.

for (ClassIt cit(huf); cit != INVALID; ++cit) {
std::cout << "Class: ";
for (ItemIt iit(huf, cit); iit != INVALID; ++iit) {
std::cout << toString(iit) << ' ' << std::endl;
}
std::cout << std::endl;
}
const Invalid INVALID
Invalid iterators.
Definition base.cc:32
LEMON style iterator for the items of a class.
Definition unionfind.h:1700
Class iterator.
Definition unionfind.h:1777

#include <lemon/unionfind.h>

Public Member Functions

 ItemIt ()
 Default constructor.
 
ItemItoperator++ ()
 Increment operator.
 
 operator const Item & () const
 Conversion operator.
 
bool operator== (const ItemIt &i)
 Equality operator.
 
bool operator!= (const ItemIt &i)
 Inequality operator.
 
bool operator== (Invalid)
 Equality operator.
 
bool operator!= (Invalid)
 Inequality operator.
 

Constructor & Destructor Documentation

◆ ItemIt()

template<typename V , typename IM , typename Comp = std::less<V>>
ItemIt ( )
inline

Default constructor

Member Function Documentation

◆ operator++()

template<typename V , typename IM , typename Comp = std::less<V>>
ItemIt & operator++ ( )
inline

It steps to the next item in the class.

◆ operator const Item &()

template<typename V , typename IM , typename Comp = std::less<V>>
operator const Item & ( ) const
inline

It converts the iterator to the current item.

◆ operator==() [1/2]

template<typename V , typename IM , typename Comp = std::less<V>>
bool operator== ( const ItemIt & i)
inline

Equality operator

◆ operator!=() [1/2]

template<typename V , typename IM , typename Comp = std::less<V>>
bool operator!= ( const ItemIt & i)
inline

Inequality operator

◆ operator==() [2/2]

template<typename V , typename IM , typename Comp = std::less<V>>
bool operator== ( Invalid )
inline

Equality operator

◆ operator!=() [2/2]

template<typename V , typename IM , typename Comp = std::less<V>>
bool operator!= ( Invalid )
inline

Inequality operator