KASKADE 7 development version
Namespaces | Functions
combinatorics.hh File Reference
#include <algorithm>
#include <numeric>
#include <cassert>
#include <functional>

Go to the source code of this file.

Namespaces

namespace  Kaskade
 
 

Functions

constexpr int Kaskade::binomial (int n, int k)
 Computes the binomial coefficient \( \binom{n}{k} \). More...
 
template<size_t m>
size_t Kaskade::multinomial (std::array< size_t, m > const &ks)
 Computes the multinomial coefficient \( \binom{n}{k_1,\dots,k_m}\), where \( n = \sum_{i=1}^m k_i \). More...
 
constexpr int Kaskade::numberOfMultiindices (int d, int m)
 Computes the number of multiindices of order m and dimension d. More...
 
template<int d>
std::array< size_t, d > Kaskade::multiIndex (size_t m, size_t n)
 Random access to multiindices. More...
 
template<class It >
void Kaskade::next_multiindex (It first, It last, int const m)
 Computes the next nonnegative multiindex of order m. More...