Navigation: Up, Table of Contents, Bibliography, Index, Title Page

Counting Input Iterator Adaptor

Definition

The iterator adaptor Counting_iterator<Iterator, Value> adds a counter to the internal iterator of type Iterator and defines equality of two instances in terms of this counter. It can be used to create finite sequences of possibly infinite sequences of values from input iterators. It complies itself to the requirements of input iterators.

#include <CGAL/Counting_iterator.h>

Creation

Counting_iterator<Iterator, Value> i ( std::size_t n = 0);
initializes the internal counter to n and i has a singular value.


Counting_iterator<Iterator, Value> i ( Iterator j, std::size_t n = 0);
initializes the internal counter to n and i to j.

See Also

copy_n.


Next: Class declaration of N_step_adaptor<I,int N,Ref,Ptr,Val,Dst,Ctg>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.