NEST main@f146f75
Loading...
Searching...
No Matches
IteratorPair< sort_iter_type_, perm_iter_type_ > Class Template Reference

A combinator of two iterators that can be used to apply permutations on a second container when sorting the first. More...

#include <iterator_pair.h>

Inheritance diagram for IteratorPair< sort_iter_type_, perm_iter_type_ >:
[legend]
Collaboration diagram for IteratorPair< sort_iter_type_, perm_iter_type_ >:
[legend]

Public Types

using ReferenceType = iterator_pair_types< sort_iter_type_, perm_iter_type_ >::ref_type
using DifferenceType = iterator_pair_types< sort_iter_type_, perm_iter_type_ >::difference_type

Public Member Functions

 IteratorPair ()=default
 IteratorPair (sort_iter_type_, perm_iter_type_)
ReferenceType operator[] (DifferenceType n) const

Private Member Functions

void increment ()
 Advance by one position.
void decrement ()
 Retreat by one position.
bool equal (IteratorPair const &) const
 Compare for equality.
void advance (typename iterator_pair_types< sort_iter_type_, perm_iter_type_ >::difference_type)
 Advance by a number of positions.
iterator_pair_types< sort_iter_type_, perm_iter_type_ >::ref_type dereference () const
 Access the value referred to.
iterator_pair_types< sort_iter_type_, perm_iter_type_ >::difference_type distance_to (IteratorPair const &) const
 Measure the distance to another iterator.

Private Attributes

sort_iter_type_ sort_iter_
 Iterator of the container being sorted.
perm_iter_type_ perm_iter_
 Iterator of the container being permuted.

Friends

class boost::iterator_core_access

Detailed Description

template<typename sort_iter_type_, typename perm_iter_type_>
class IteratorPair< sort_iter_type_, perm_iter_type_ >

A combinator of two iterators that can be used to apply permutations on a second container when sorting the first.

Template Parameters
sort_iter_type_Iterator type of the container being sorted.
perm_iter_type_Iterator type of the container being permuted.

Member Typedef Documentation

◆ DifferenceType

template<typename sort_iter_type_, typename perm_iter_type_>
using IteratorPair< sort_iter_type_, perm_iter_type_ >::DifferenceType = iterator_pair_types< sort_iter_type_, perm_iter_type_ >::difference_type

◆ ReferenceType

template<typename sort_iter_type_, typename perm_iter_type_>
using IteratorPair< sort_iter_type_, perm_iter_type_ >::ReferenceType = iterator_pair_types< sort_iter_type_, perm_iter_type_ >::ref_type

Constructor & Destructor Documentation

◆ IteratorPair() [1/2]

template<typename sort_iter_type_, typename perm_iter_type_>
IteratorPair< sort_iter_type_, perm_iter_type_ >::IteratorPair ( )
default

Referenced by distance_to(), and equal().

Here is the caller graph for this function:

◆ IteratorPair() [2/2]

template<typename sort_iter_type_, typename perm_iter_type_>
IteratorPair< sort_iter_type_, perm_iter_type_ >::IteratorPair ( sort_iter_type_ sort_iter,
perm_iter_type_ perm_iter )
inline

References perm_iter_, and sort_iter_.

Member Function Documentation

◆ advance()

template<typename sort_iter_type_, typename perm_iter_type_>
void IteratorPair< sort_iter_type_, perm_iter_type_ >::advance ( typename iterator_pair_types< sort_iter_type_, perm_iter_type_ >::difference_type n)
inlineprivate

Advance by a number of positions.

References perm_iter_, and sort_iter_.

◆ decrement()

template<typename sort_iter_type_, typename perm_iter_type_>
void IteratorPair< sort_iter_type_, perm_iter_type_ >::decrement ( )
inlineprivate

Retreat by one position.

References perm_iter_, and sort_iter_.

◆ dereference()

template<typename sort_iter_type_, typename perm_iter_type_>
iterator_pair_types< sort_iter_type_, perm_iter_type_ >::ref_type IteratorPair< sort_iter_type_, perm_iter_type_ >::dereference ( ) const
inlineprivate

Access the value referred to.

Returns
A boost::tuple with two values.

References perm_iter_, and sort_iter_.

◆ distance_to()

template<typename sort_iter_type_, typename perm_iter_type_>
iterator_pair_types< sort_iter_type_, perm_iter_type_ >::difference_type IteratorPair< sort_iter_type_, perm_iter_type_ >::distance_to ( IteratorPair< sort_iter_type_, perm_iter_type_ > const & other) const
inlineprivate

Measure the distance to another iterator.

References IteratorPair(), and sort_iter_.

Here is the call graph for this function:

◆ equal()

template<typename sort_iter_type_, typename perm_iter_type_>
bool IteratorPair< sort_iter_type_, perm_iter_type_ >::equal ( IteratorPair< sort_iter_type_, perm_iter_type_ > const & other) const
inlineprivate

Compare for equality.

References IteratorPair(), and sort_iter_.

Here is the call graph for this function:

◆ increment()

template<typename sort_iter_type_, typename perm_iter_type_>
void IteratorPair< sort_iter_type_, perm_iter_type_ >::increment ( )
inlineprivate

Advance by one position.

References perm_iter_, and sort_iter_.

◆ operator[]()

template<typename sort_iter_type_, typename perm_iter_type_>
ReferenceType IteratorPair< sort_iter_type_, perm_iter_type_ >::operator[] ( DifferenceType n) const
inline

◆ boost::iterator_core_access

template<typename sort_iter_type_, typename perm_iter_type_>
friend class boost::iterator_core_access
friend

Member Data Documentation

◆ perm_iter_

template<typename sort_iter_type_, typename perm_iter_type_>
perm_iter_type_ IteratorPair< sort_iter_type_, perm_iter_type_ >::perm_iter_
private

Iterator of the container being permuted.

Referenced by advance(), decrement(), dereference(), increment(), and IteratorPair().

◆ sort_iter_

template<typename sort_iter_type_, typename perm_iter_type_>
sort_iter_type_ IteratorPair< sort_iter_type_, perm_iter_type_ >::sort_iter_
private

Iterator of the container being sorted.

Referenced by advance(), decrement(), dereference(), distance_to(), equal(), increment(), and IteratorPair().


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