mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-15 16:36:03 +08:00
902 B
902 B
| title |
|---|
| Combinations / Permutations |
Templates to provide combinations and permutations constants.
Combinations
See Combinations
template <size_t N, size_t K>
struct combinations
Member const
Number of combinations of K items from a total of N.
static ETL_CONSTEXPR size_t value
If C++17 is supported.
template <size_t N, size_t K>
inline constexpr size_t combinations_v = combinations<N, K>::value;
Permutations
See Permutations
template <size_t N, size_t K>
struct permutations
Member const
Number of permutations of K items from a total of N.
static ETL_CONSTEXPR size_t value
If C++17 is supported.
template <size_t N, size_t K>
inline constexpr size_t permutations_v = permutations<N, K>::value;