abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
Loading...
Searching...
No Matches
HeapUnionFind< V , IM , Comp >::ItemIt Class Reference

LEMON style iterator for the items of a class. More...

#include <lemon/unionfind.h>

Public Member Functions

 ItemIt ()
 Default constructor.
ItemIt & operator++ ()
 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.

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;
}
Class iterator.
Definition unionfind.h:1754
ItemIt()
Default constructor.
Definition unionfind.h:1696
const Invalid INVALID
Invalid iterators.
Definition base.cc:33

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