alpaqa pantr
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Related Functions | List of all members
CircularIndexIterator< IndexT > Struct Template Reference

#include <alpaqa/include/alpaqa/util/ringbuffer.hpp>

Detailed Description

template<class IndexT = size_t>
struct alpaqa::CircularIndexIterator< IndexT >

Definition at line 30 of file ringbuffer.hpp.

+ Collaboration diagram for CircularIndexIterator< IndexT >:

Public Types

using Index = IndexT
 
using Indices = CircularIndices< Index >
 
using value_type = Indices
 
using reference = value_type
 
using difference_type = std::ptrdiff_t
 
using pointer = void
 
using iterator_category = std::input_iterator_tag
 

Public Member Functions

 CircularIndexIterator ()
 
 CircularIndexIterator (Indices i, Index max)
 
reference operator* () const
 
CircularIndexIteratoroperator++ ()
 
CircularIndexIteratoroperator-- ()
 
CircularIndexIterator operator++ (int)
 
CircularIndexIterator operator-- (int)
 

Public Attributes

Indices i
 
Index max
 

Related Functions

(Note that these are not member functions.)

template<class IndexT >
bool operator== (CircularIndexIterator< IndexT > a, CircularIndexIterator< IndexT > b)
 
template<class IndexT >
bool operator!= (CircularIndexIterator< IndexT > a, CircularIndexIterator< IndexT > b)
 

Member Typedef Documentation

◆ Index

using Index = IndexT

Definition at line 31 of file ringbuffer.hpp.

◆ Indices

Definition at line 32 of file ringbuffer.hpp.

◆ value_type

Definition at line 40 of file ringbuffer.hpp.

◆ reference

Definition at line 41 of file ringbuffer.hpp.

◆ difference_type

using difference_type = std::ptrdiff_t

Definition at line 42 of file ringbuffer.hpp.

◆ pointer

using pointer = void

Definition at line 43 of file ringbuffer.hpp.

◆ iterator_category

using iterator_category = std::input_iterator_tag

Definition at line 44 of file ringbuffer.hpp.

Constructor & Destructor Documentation

◆ CircularIndexIterator() [1/2]

Definition at line 34 of file ringbuffer.hpp.

◆ CircularIndexIterator() [2/2]

CircularIndexIterator ( Indices  i,
Index  max 
)
inline

Definition at line 35 of file ringbuffer.hpp.

Member Function Documentation

◆ operator*()

reference operator* ( ) const
inline

Definition at line 46 of file ringbuffer.hpp.

◆ operator++() [1/2]

CircularIndexIterator & operator++ ( )
inline

Definition at line 47 of file ringbuffer.hpp.

◆ operator--() [1/2]

CircularIndexIterator & operator-- ( )
inline

Definition at line 53 of file ringbuffer.hpp.

◆ operator++() [2/2]

CircularIndexIterator operator++ ( int  )
inline

Definition at line 59 of file ringbuffer.hpp.

◆ operator--() [2/2]

CircularIndexIterator operator-- ( int  )
inline

Definition at line 64 of file ringbuffer.hpp.

Friends And Related Function Documentation

◆ operator==()

bool operator== ( CircularIndexIterator< IndexT >  a,
CircularIndexIterator< IndexT >  b 
)
related
Note
Only valid for two indices in the same range.

Definition at line 74 of file ringbuffer.hpp.

◆ operator!=()

bool operator!= ( CircularIndexIterator< IndexT >  a,
CircularIndexIterator< IndexT >  b 
)
related
Note
Only valid for two indices in the same range.

Definition at line 82 of file ringbuffer.hpp.

Member Data Documentation

◆ i

Definition at line 37 of file ringbuffer.hpp.

◆ max

Index max

Definition at line 38 of file ringbuffer.hpp.


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