19 stream << cb.increment_nr() <<
" - " <<
ncr(8, 4) <<
nl;
21 stream << cb.decrement_nr() <<
" - " <<
ncr(7, 3) <<
nl;
23 stream << cb.increment_n() <<
" - " <<
ncr(8, 3) <<
nl;
25 stream << cb.decrement_n() <<
" - " <<
ncr(7, 3) <<
nl;
27 stream << cb.increment_r() <<
" - " <<
ncr(7, 4) <<
nl;
29 stream << cb.decrement_r() <<
" - " <<
ncr(7, 3) <<
nl;
38 std::vector<std::string> vct_fruits{
"apple",
"banana",
"cherry"};
41 std::deque<std::string> dqe_fruits{
"apple",
"banana",
"cherry"};
43 std::list<std::string> lst_fruits{
"apple",
"banana",
"cherry"};
45 int n = (int)vct_fruits.size();
47 for(
int r = 0; r <= n; ++r)
51 for(
size_t m_th = 0; m_th < max; ++m_th)
53 stream << enumerate_combination<std::vector>(m_th, dqe_fruits, r) <<
" - "
54 << enumerate_combination<std::vector>(m_th, vct_fruits, r) <<
" - "
55 << enumerate_combination<std::vector>(m_th, lst_fruits, r) <<
nl;
68 for(
size_t r = 0; r <= n; ++r)
72 for(
size_t m_th = 0; m_th < max; ++m_th)
86 std::vector<std::string> vct_fruits{
"apple",
"banana",
"cherry"};
88 std::deque<std::string> dqe_fruits{
"apple",
"banana",
"cherry"};
90 size_t n = vct_fruits.size();
92 for(
size_t r = 0; r <= n; ++r)
96 for(
size_t m_th = 0; m_th < max; ++m_th)
117 std::vector<std::string> v{
"apple",
"banana",
"peach"};
119 std::vector<std::reference_wrapper<std::string>> vr{v[0], v[1], v[2]};
121 stream << vr <<
" - 사랑해요!! 나는 김창희" <<
nl;
void examples_enum_permutations()
void examples_enumerate_permutation()
void examples_enum_combination()
void load_default_locale(bool ShowLocaleName=false)
Load system default locale for string conversion.
enable_if_all_in_list_t< types::type_list_t< Type1, Type2 >, integral_list_t, ReturnType > npr(Type1 nn, Type2 rr)
enable_if_all_in_list_t< types::type_list_t< Type1, Type2 >, integral_list_t, ReturnType > ncr(Type1 nn, Type2 rr)
std::vector< T > enum_permutation(T n, T r, T m_th)
std::vector< int > enumerate_permutation(std::vector< int > e, RType r, MType m_th)
std::vector< T > enum_permutation_list(T n, T r, T mth)
Includes subnamespace conversion.
Stream output operators << are implemented.