template<typename TYPE, typename TOCHECKFUNCTOR = CheckAllFunctor<TYPE>>
class tlp::UniqueIterator< TYPE, TOCHECKFUNCTOR >
UniqueIterator enables to remove duplicated elements in an iterator.
- Parameters
-
it | the iterator in which we want to filter out duplicated elements |
checkFuncor | a functor that enable to indicate wheter or not the element could be duplicated (default test all elements) |
The functor function shoul have the following form
class ACheckFunctor {
bool operator(TYPE a) {
return true if a could be duplicated else false;
}
};
checkFunctor are used for optimization purpose to prevent to log(n) test for all elements when not necessary.