\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.12 - STL Extensions for CGAL
CGAL::Counting_iterator< Iterator, Value > Class Template Reference

#include <CGAL/iterator.h>

Definition

The iterator adaptor Counting_iterator 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.

Is Model Of:
InputIterator

Requirements

Iterator is a model for InputIterator.

See also
CGAL::copy_n()

Creation

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