Geogram  Version 1.9.1
A programming library of geometric algorithms
GEO::index_range Class Reference

A generic index_range bounded by two "non-iterators". More...

#include <geogram/basic/range.h>

Public Types

typedef index_as_iterator iterator
 
typedef index_as_iterator const_iterator
 

Public Member Functions

 index_range (index_as_iterator b, index_as_iterator e)
 index_range constructor More...
 
index_as_iterator begin () const
 gets the first index More...
 
index_as_iterator end () const
 gets one position past the last index More...
 
index_t nb () const
 gets the number of elements in the index_range
 
index_t operator[] (index_t i) const
 direct access to an arbitrary element in the index_range More...
 

Detailed Description

A generic index_range bounded by two "non-iterators".

Definition at line 106 of file range.h.

Constructor & Destructor Documentation

◆ index_range()

GEO::index_range::index_range ( index_as_iterator  b,
index_as_iterator  e 
)
inline

index_range constructor

Parameters
[in]bfirst index
[in]eone position past the last index

Definition at line 117 of file range.h.

Member Function Documentation

◆ begin()

index_as_iterator GEO::index_range::begin ( ) const
inline

gets the first index

Returns
a index_as_iterator corresponding to the first index

Definition at line 124 of file range.h.

◆ end()

index_as_iterator GEO::index_range::end ( ) const
inline

gets one position past the last index

Returns
a index_as_iterator corresponding to one position past the last index

Definition at line 133 of file range.h.

◆ operator[]()

index_t GEO::index_range::operator[] ( index_t  i) const
inline

direct access to an arbitrary element in the index_range

Parameters
[in]ithe index of the element
Returns
an index_as_iterator corresponding to the i th element

Definition at line 149 of file range.h.


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