ComboSet.hpp
Tools to step through combinations of items where size is known a compile time.
This file is part of Empirical, https://github.com/devosoft/Empirical Copyright (C) 2024 Michigan State University MIT Software license; see doc/LICENSE.md
Step through all combinations of size K from a set of N values.
Defines
-
INCLUDE_EMP_MATH_COMBO_SET_HPP_GUARD
-
template<size_t N, size_t K>
class ComboSet - #include <ComboSet.hpp>
Public Functions
-
inline size_t &operator[](const size_t index)
-
inline const size_t &operator[](const size_t index) const
-
bool Next()
-
constexpr size_t size()
Private Members
-
std::array<size_t, K> cur_combo = MakeSequenceArray<K>()
-
inline size_t &operator[](const size_t index)