5#ifndef TRIGCOMPOSITEUTILS_KFROMNITR_H
6#define TRIGCOMPOSITEUTILS_KFROMNITR_H
Iterates over all combinations of k values chosen from a range n.
bool exhausted() const
True if this iterator is past the end.
bool operator==(const KFromNItr &other) const
Iterator comparison functions.
bool operator!=(const KFromNItr &other) const
pointer operator->() const
const value_type & reference
reference operator*() const
Dereference.
std::ptrdiff_t difference_type
KFromNItr()=default
Default constructor creates a generic past-the-end iterator.
KFromNItr & operator++()
Pre-increment operator.
std::size_t size() const
The size of each combination (k)
std::vector< std::size_t > value_type
std::input_iterator_tag iterator_category
Iterator traits.
void reset()
Reset the iterator to its start position.
std::vector< std::size_t > m_current
The current combination.
std::size_t m_N
The number of indices.
const value_type * pointer