Theoretica
A C++ numerical and automatic mathematical library
theoretica::vec_iterator< Vector, ReturnType > Class Template Reference

for vectors. More...

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = vector_element_t< Vector >
 
using pointer = value_type *
 
using reference = value_type &
 

Public Member Functions

 vec_iterator (Vector &vector, size_t index)
 Construct the iterator from a pointer to the elements and a starting index.
 
ReturnType operator* ()
 Dereference the iterator to get the current element.
 
vec_iteratoroperator++ ()
 Move to the next element in the vector.
 
size_t index ()
 Move to the previous element in the vector. More...
 
bool operator== (const vec_iterator &other) const
 Comparison operators.
 
bool operator!= (const vec_iterator &other) const
 

Detailed Description

template<typename Vector, typename ReturnType = vector_element_t<Vector>&>
class theoretica::vec_iterator< Vector, ReturnType >

for vectors.

Member Function Documentation

◆ index()

template<typename Vector , typename ReturnType = vector_element_t<Vector>&>
size_t theoretica::vec_iterator< Vector, ReturnType >::index ( )
inline

Move to the previous element in the vector.

Get the current index


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