Class Combination
Defined in File combination.hpp
Class Documentation
-
class bitbots_splines::Combination
-
Implement binomial coefficient computation using Pascal Triangle and iterate thought all (n choose k) combinations
Public Functions
-
unsigned long binomialCoefficient(size_t k, size_t n)
Compute the number of possible combinations for (n choose k) (using dynamic progamming)
-
void startCombination(size_t k, size_t n)
Start combination iteration for given (n choose k)
-
std::vector<size_t> nextCombination()
Return the next combination. Return empty sdt::vector when iteration is finished
Private Types
-
typedef std::pair<unsigned long, unsigned long> Pair
Typedefs
-
typedef std::vector<size_t> Comb
Private Functions
-
bool incrIndexes(size_t i)
Increment by one the _indexes container at digit i (recursively). Return true on iteration end
-
unsigned long binomialCoefficient(size_t k, size_t n)