ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
gsl::combination::const_iterator_t< reverse > Class Template Reference

A class template for the const iterators. More...

Inheritance diagram for gsl::combination::const_iterator_t< reverse >:
Inheritance graph
Collaboration diagram for gsl::combination::const_iterator_t< reverse >:
Collaboration graph

Public Types

typedef iterator_base< combinationconst, unsignedlong, reverse >::difference_type difference_type
 Difference type. More...
 
- Public Types inherited from gsl::combination::iterator_base< combination const, unsigned long, reverse >
typedef std::random_access_iterator_tag iterator_category
 An iterator must have an iterator category. More...
 
typedef size_t value_type
 An iterator must have a value type. More...
 
typedef value_typepointer
 An iterator must have a pointer typea. More...
 
typedef value_typereference
 An iterator must have a reference type. More...
 
typedef ptrdiff_t difference_type
 An iterator must have a difference_type. More...
 

Public Member Functions

const_iterator_t< reverse > & operator= (const_iterator_t< reverse > const &i)
 We can assign one output iterator from another. More...
 
const_iterator_t< reverse > & operator++ ()
 The prefix ++ operator. More...
 
const_iterator_t< reverse > operator++ (int)
 The postfix ++ operator. More...
 
const_iterator_t< reverse > & operator-- ()
 The prefix – operator. More...
 
const_iterator_t< reverse > operator-- (int)
 The postfix – operator. More...
 
const_iterator_t< reverse > & operator+= (difference_type const n)
 The += operator. More...
 
const_iterator_t< reverse > & operator-= (difference_type const n)
 The -= operator. More...
 
const_iterator_t< reverse > operator+ (difference_type const n) const
 The + operator. More...
 
const_iterator_t< reverse > operator- (difference_type const n) const
 The - operator: subtract distance from iterator. More...
 
difference_type operator- (const_iterator_t< reverse > const &i) const
 The - operator: find distance between two iterators. More...
 
 const_iterator_t ()
 The default constructor. More...
 
 const_iterator_t (const_iterator_t< reverse > const &i)
 A copy constructor. More...
 
bool operator== (const_iterator_t< reverse > const &i) const
 Comparison with const_iterator. More...
 
bool operator!= (const_iterator_t< reverse > const &i) const
 Comparison with const_iterator. More...
 
bool operator< (const_iterator_t< reverse > const &i) const
 Comparison with const_iterator. More...
 
- Public Member Functions inherited from gsl::combination::iterator_base< combination const, unsigned long, reverse >
reference operator* () const
 Dereference the pointer. More...
 
pointer operator-> () const
 Dereference the pointer. More...
 
reference operator[] (difference_type const n) const
 Get element at i + n by reference ([] operator). More...
 
difference_type operator- (iterator_base< combination const, unsigned long, reverse > const &i) const
 The - operator: find distance between two iterators. More...
 
bool operator== (iterator_base< combination const, unsigned long, reverse > const &i) const
 The == operator. More...
 
bool operator!= (iterator_base< combination const, unsigned long, reverse > const &i) const
 The != operator. More...
 
bool operator< (iterator_base< combination const, unsigned long, reverse > const &i) const
 The < operator is used to compare iterators. More...
 

Protected Member Functions

 const_iterator_t (combination const *v, difference_type position)
 This constructor allows combination to create non-default iterators. More...
 
- Protected Member Functions inherited from gsl::combination::iterator_base< combination const, unsigned long, reverse >
void increment ()
 Increment the iterator. More...
 
void decrement ()
 Decrement the iterator. More...
 
void shift (difference_type const n)
 Shift iterator n places. More...
 
 iterator_base ()
 The iterator is default constructible. More...
 
 iterator_base (combination const *v, difference_type position)
 This constructor allows combination to create non-default iterators. More...
 

Friends

class combination
 

Additional Inherited Members

- Protected Attributes inherited from gsl::combination::iterator_base< combination const, unsigned long, reverse >
combination const * v
 Store a pointer to a combination we can iterate over: 0 if no combination. More...
 
difference_type position
 Mark position of iterator within combination. More...
 

Detailed Description

template<bool reverse>
class gsl::combination::const_iterator_t< reverse >

A class template for the const iterators.

Definition at line 521 of file combination.hpp.

Member Typedef Documentation

◆ difference_type

template<bool reverse>
typedef iterator_base<combinationconst,unsignedlong,reverse>::difference_type gsl::combination::const_iterator_t< reverse >::difference_type

Difference type.

Definition at line 579 of file combination.hpp.

Constructor & Destructor Documentation

◆ const_iterator_t() [1/3]

template<bool reverse>
gsl::combination::const_iterator_t< reverse >::const_iterator_t ( )
inline

The default constructor.

Definition at line 635 of file combination.hpp.

◆ const_iterator_t() [2/3]

template<bool reverse>
gsl::combination::const_iterator_t< reverse >::const_iterator_t ( const_iterator_t< reverse > const &  i)
inline

◆ const_iterator_t() [3/3]

template<bool reverse>
gsl::combination::const_iterator_t< reverse >::const_iterator_t ( combination const *  v,
difference_type  position 
)
inlineprotected

This constructor allows combination to create non-default iterators.

Parameters
vThe combination that creates this
positionThe initial postion of the iterator

Definition at line 687 of file combination.hpp.

Member Function Documentation

◆ operator!=()

template<bool reverse>
bool gsl::combination::const_iterator_t< reverse >::operator!= ( const_iterator_t< reverse > const &  i) const
inline

Comparison with const_iterator.

Parameters
ianother iterator
Returns
false or true according as this points to same element as i

Definition at line 657 of file combination.hpp.

References gsl::combination::const_iterator_t< reverse >::operator==().

◆ operator+()

template<bool reverse>
const_iterator_t< reverse > gsl::combination::const_iterator_t< reverse >::operator+ ( difference_type const  n) const
inline

The + operator.

Parameters
nA difference_type value to be added
Returns
A new iterator
See also
ccgsl::operator+();

Definition at line 607 of file combination.hpp.

References gsl::combination::n().

◆ operator++() [1/2]

template<bool reverse>
const_iterator_t< reverse > & gsl::combination::const_iterator_t< reverse >::operator++ ( )
inline

The prefix ++ operator.

Returns
this

Definition at line 541 of file combination.hpp.

References gsl::combination::iterator_base< container, content, reverse >::increment().

◆ operator++() [2/2]

template<bool reverse>
const_iterator_t< reverse > gsl::combination::const_iterator_t< reverse >::operator++ ( int  )
inline

The postfix ++ operator.

Returns
this

Definition at line 549 of file combination.hpp.

References gsl::combination::iterator_base< container, content, reverse >::increment().

◆ operator+=()

template<bool reverse>
const_iterator_t< reverse > & gsl::combination::const_iterator_t< reverse >::operator+= ( difference_type const  n)
inline

The += operator.

Parameters
nA difference_type value to be added to position of iterator
Returns
this

Definition at line 586 of file combination.hpp.

References gsl::combination::iterator_base< combination const, unsigned long, reverse >::shift().

◆ operator-() [1/2]

template<bool reverse>
difference_type gsl::combination::const_iterator_t< reverse >::operator- ( const_iterator_t< reverse > const &  i) const
inline

The - operator: find distance between two iterators.

Parameters
iA second iterator
Returns
(signed) distance between this and i

Definition at line 629 of file combination.hpp.

References gsl::combination::iterator_base< container, content, reverse >::operator-().

◆ operator-() [2/2]

template<bool reverse>
const_iterator_t< reverse > gsl::combination::const_iterator_t< reverse >::operator- ( difference_type const  n) const
inline

The - operator: subtract distance from iterator.

Parameters
nA difference_type value to be subtracted
Returns
A new iterator
See also
ccgsl::operator-();

Definition at line 619 of file combination.hpp.

References gsl::combination::n().

◆ operator--() [1/2]

template<bool reverse>
const_iterator_t< reverse > & gsl::combination::const_iterator_t< reverse >::operator-- ( )
inline

The prefix – operator.

Returns
this

Definition at line 561 of file combination.hpp.

References gsl::combination::iterator_base< container, content, reverse >::decrement().

◆ operator--() [2/2]

template<bool reverse>
const_iterator_t< reverse > gsl::combination::const_iterator_t< reverse >::operator-- ( int  )
inline

The postfix – operator.

Returns
this

Definition at line 569 of file combination.hpp.

References gsl::combination::iterator_base< container, content, reverse >::decrement().

◆ operator-=()

template<bool reverse>
const_iterator_t< reverse > & gsl::combination::const_iterator_t< reverse >::operator-= ( difference_type const  n)
inline

The -= operator.

Parameters
nA difference_type value to be subtracted from position of iterator
Returns
this

Definition at line 596 of file combination.hpp.

References gsl::combination::iterator_base< combination const, unsigned long, reverse >::shift().

◆ operator<()

◆ operator=()

template<bool reverse>
const_iterator_t< reverse > & gsl::combination::const_iterator_t< reverse >::operator= ( const_iterator_t< reverse > const &  i)
inline

We can assign one output iterator from another.

Parameters
iThe iterator to copy

Definition at line 530 of file combination.hpp.

References gsl::combination::iterator_base< container, content, reverse >::position, and gsl::combination::iterator_base< container, content, reverse >::v.

◆ operator==()

template<bool reverse>
bool gsl::combination::const_iterator_t< reverse >::operator== ( const_iterator_t< reverse > const &  i) const
inline

Friends And Related Function Documentation

◆ combination

template<bool reverse>
friend class combination
friend

Definition at line 681 of file combination.hpp.


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