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

Counting Input Iterator Adaptor

Definition

The iterator adaptor CGAL_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

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

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

See Also

CGAL_copy_n.


Next: Class declaration of CGAL_N_step_adaptor<I,int N,Ref,Ptr,Val,Dst,Ctg>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL Project. 22 January 1999.