|
libcrn
3.9.5
A document image processing library
|
Combinatorics toolbox. More...
Functions | |
| int | CountCombinations (int n, int p) noexcept |
More... | |
| int | CountArrangements (int n, int p) noexcept |
More... | |
| template<class ITER , class CMP > | |
| std::vector< typename std::iterator_traits< ITER > ::value_type > | Minimals (ITER i_begin, ITER i_end, CMP comp=std::less< typename std::iterator_traits< ITER >::value_type >()) |
|
noexcept |
Counts arrangements of p objects from n: 
| [in] | n | total number of objects |
| [in] | p | number of objects to choose |
Definition at line 55 of file CRNCombinatorics.cpp.
|
noexcept |
Counts combinations of p objects from n: 
| [in] | n | total number of objects |
| [in] | p | number of objects to choose |
Definition at line 33 of file CRNCombinatorics.cpp.
| std::vector<typename std::iterator_traits<ITER>::value_type> crn::Combinatorics::Minimals | ( | ITER | i_begin, |
| ITER | i_end, | ||
| CMP | comp = std::less<typename std::iterator_traits<ITER>::value_type>() |
||
| ) |
Get minimal elements of a collection given an order relation
Definition at line 48 of file CRNCombinatorics.h.
1.8.6