OKlibrary
0.2.1.6
|
Classes | |
struct | Error |
class | Factorial |
Functor for computation of the factorial function; with helper function factorial. More... | |
class | Descending_power |
Functor for computation of descending powers; with helper function descending_power. More... | |
class | Binom_integer_over_integer |
Functor for computing integral binomial coefficients; with helper function binom_integer_over_integer. More... | |
Enumerations | |
enum | choose_possibilities { no_subsets = -1, no_further_subsets = 0, further_subsets = 1 } |
Function for running through all k-subsets of an n-set in lexicographical order. More... | |
Functions | |
template<typename Int > | |
Int | factorial (const Int &n) |
template<typename Num , typename Int > | |
Num | descending_power (Num b, Int k) |
template<typename Int > | |
Int | binom_integer_over_integer (const Int z, const Int k) |
template<typename Int > | |
Int | binom (Int a, Int b) |
template<typename Int , class ForwardIterator > | |
choose_possibilities | choose_next (const Int n, const Int k, const ForwardIterator begin, const ForwardIterator end) |
Function for running through all k-subsets of an n-set in lexicographical order.
Given a subset as the range of elements, sorted in ascending order, modify the range to the next subset in lexicographical order, if possible.
See ComputerAlgebra/Combinatorics/Lisp/Enumeration/Subsets.mac for the procedural specification at Maxima/Lisp level.
Definition at line 168 of file Combinatorics.hpp.
Int Combinatorics::binom | ( | Int | a, |
Int | b | ||
) | [inline] |
Definition at line 139 of file Combinatorics.hpp.
Int Combinatorics::binom_integer_over_integer | ( | const Int | z, |
const Int | k | ||
) | [inline] |
Definition at line 135 of file Combinatorics.hpp.
choose_possibilities Combinatorics::choose_next | ( | const Int | n, |
const Int | k, | ||
const ForwardIterator | begin, | ||
const ForwardIterator | end | ||
) |
Definition at line 170 of file Combinatorics.hpp.
References Latex_Handler::begin(), further_subsets, no_further_subsets, and no_subsets.
Referenced by Ramsey::Enumerate_hyperedges< Int >::next().
Num Combinatorics::descending_power | ( | Num | b, |
Int | k | ||
) | [inline] |
Definition at line 81 of file Combinatorics.hpp.
Int Combinatorics::factorial | ( | const Int & | n | ) | [inline] |
Definition at line 60 of file Combinatorics.hpp.
Referenced by OKlib::HypergraphColouring::Greedy_colouring< UndirectedGraph >::evaluation().