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

#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 Symbols

(Note that these are not member symbols.)

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

template<class IndexT = size_t>
using Index = IndexT

Definition at line 31 of file ringbuffer.hpp.

◆ Indices

template<class IndexT = size_t>
using Indices = CircularIndices<Index>

Definition at line 32 of file ringbuffer.hpp.

◆ value_type

template<class IndexT = size_t>
using value_type = Indices

Definition at line 40 of file ringbuffer.hpp.

◆ reference

template<class IndexT = size_t>
using reference = value_type

Definition at line 41 of file ringbuffer.hpp.

◆ difference_type

template<class IndexT = size_t>
using difference_type = std::ptrdiff_t

Definition at line 42 of file ringbuffer.hpp.

◆ pointer

template<class IndexT = size_t>
using pointer = void

Definition at line 43 of file ringbuffer.hpp.

◆ iterator_category

template<class IndexT = size_t>
using iterator_category = std::input_iterator_tag

Definition at line 44 of file ringbuffer.hpp.

Constructor & Destructor Documentation

◆ CircularIndexIterator() [1/2]

template<class IndexT = size_t>
CircularIndexIterator ( )
inline

Definition at line 34 of file ringbuffer.hpp.

◆ CircularIndexIterator() [2/2]

template<class IndexT = size_t>
CircularIndexIterator ( Indices  i,
Index  max 
)
inline

Definition at line 35 of file ringbuffer.hpp.

Member Function Documentation

◆ operator*()

template<class IndexT = size_t>
reference operator* ( ) const
inline

Definition at line 46 of file ringbuffer.hpp.

◆ operator++() [1/2]

template<class IndexT = size_t>
CircularIndexIterator & operator++ ( )
inline

Definition at line 47 of file ringbuffer.hpp.

◆ operator--() [1/2]

template<class IndexT = size_t>
CircularIndexIterator & operator-- ( )
inline

Definition at line 53 of file ringbuffer.hpp.

◆ operator++() [2/2]

template<class IndexT = size_t>
CircularIndexIterator operator++ ( int  )
inline

Definition at line 59 of file ringbuffer.hpp.

◆ operator--() [2/2]

template<class IndexT = size_t>
CircularIndexIterator operator-- ( int  )
inline

Definition at line 64 of file ringbuffer.hpp.

Friends And Related Symbol Documentation

◆ operator==()

Note
Only valid for two indices in the same range.

Definition at line 74 of file ringbuffer.hpp.

◆ operator!=()

Note
Only valid for two indices in the same range.

Definition at line 82 of file ringbuffer.hpp.

Member Data Documentation

◆ i

template<class IndexT = size_t>
Indices i

Definition at line 37 of file ringbuffer.hpp.

◆ max

template<class IndexT = size_t>
Index max

Definition at line 38 of file ringbuffer.hpp.


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