15 template <
typename CounterType>
124 template <
typename DerivedCounter>
162 operator bool()
const {
return valid(); }
A Counter allows looping over many incrementing variables in one loop.
Container m_current
The current state of the container.
const value_type & _initial(size_type index) const
BaseCounter(const Container &_initial, const Container &_final, const Container &_increment, Access _access=Access(), Compare _compare=Compare())
Construct a Counter-type object.
CounterValueIterator< DerivedCounter > const_value_iterator
value_type & _final(size_type index)
value_type & _initial(size_type index)
value_type & _upper(size_type index)
Compare m_compare
A functor that enables custom comparison, by default: operator<.
traits< DerivedCounter >::Access Access
BaseCounter()
Default construct a Counter.
const value_type & _upper(size_type index) const
bool & _valid()
non-const reference bool validity flag
const value_type & operator[](size_type index) const
const Container & increment() const
const value_type & _final(size_type index) const
bool compare(const value_type &A, const value_type &B)
Container m_lower
The minimum of each value of m_initial and m_final.
Container m_increment
Amount to increment each container value.
const value_type & current(size_type index) const
traits< DerivedCounter >::size_type size_type
const value_type & _current(size_type index) const
traits< DerivedCounter >::value_type value_type
value_type & _current(size_type index)
value_type & _increment(size_type index)
value_type & _lower(size_type index)
const value_type & _increment(size_type index) const
Container m_initial
Initial container values.
traits< DerivedCounter >::Container Container
const value_type & _lower(size_type index) const
traits< DerivedCounter >::Compare Compare
const Container & operator()() const
Container m_final
Final container values.
const_value_iterator value_begin() const
const_value_iterator value_end() const
const Container & current() const
Container m_upper
The maximum of each value of m_initial and m_final.
const Container & initial() const
pointer operator->() const
CounterValueIterator(CounterType const *_counter_ptr=nullptr, size_type _ind=0)
CounterValueIterator operator++(int)
bool operator!=(const CounterValueIterator &_it)
reference operator*() const
CounterType::value_type value_type
CounterValueIterator & operator++()
bool operator==(const CounterValueIterator &_it)
CounterType const * m_counter_ptr
std::random_access_iterator_tag iterator_category
CounterType::size_type difference_type
const value_type & reference
CounterType::size_type size_type
const value_type * pointer
static bool _compare(T const &a, T const &b, double tol)