Beispiel #1
0
 inline typename std::
     enable_if<!std::is_same<mutation_removal_policy,
                             std::true_type>::value
               && !std::is_same<mutation_removal_policy,
                                fwdpp::remove_nothing>::value>::type
     gamete_cleaner(gcont_t &gametes, const mcont_t &mutations,
                    const std::vector<uint_t> &mcounts,
                    const uint_t twoN,
                    const mutation_removal_policy &mp)
 {
     gamete_cleaner_details(
         gametes,
         [&mutations, &mcounts, &mp,
          twoN](const typename gcont_t::value_type::mutation_container
                    &mc) {
             return find_fixation()(mc, mutations, mcounts, twoN, mp);
         },
         [&mutations, &mcounts, &mp,
          twoN](typename gcont_t::value_type::mutation_container &mc,
                typename gcont_t::value_type::mutation_container::
                    value_type v) {
             return gamete_cleaner_erase_remove_idiom_wrapper()(
                 mc, mutations, mcounts, v, twoN, mp);
         });
 }
Beispiel #2
0
 inline
     typename std::enable_if<std::is_same<mutation_removal_policy,
                                          std::true_type>::value>::type
     gamete_cleaner(gcont_t &gametes, const mcont_t &,
                    const std::vector<uint_t> &mcounts,
                    const uint_t twoN, const mutation_removal_policy &)
 {
     gamete_cleaner_details(
         gametes, std::bind(find_fixation(), std::placeholders::_1,
                            std::cref(mcounts), twoN),
         std::bind(gamete_cleaner_erase_remove_idiom_wrapper(),
                   std::placeholders::_1, std::cref(mcounts),
                   std::placeholders::_2, twoN));
 }
Beispiel #3
0
 inline typename std::
     enable_if<!std::is_same<mutation_removal_policy,
                             std::true_type>::value
               && !std::is_same<mutation_removal_policy,
                                fwdpp::remove_nothing>::value>::type
     gamete_cleaner(gcont_t &gametes, const mcont_t &mutations,
                    const std::vector<uint_t> &mcounts,
                    const uint_t twoN,
                    const mutation_removal_policy &mp)
 {
     gamete_cleaner_details(
         gametes, std::bind(find_fixation(), std::placeholders::_1,
                            std::cref(mutations), std::cref(mcounts),
                            twoN, std::forward<decltype(mp)>(mp)),
         std::bind(gamete_cleaner_erase_remove_idiom_wrapper(),
                   std::placeholders::_1, std::cref(mutations),
                   std::cref(mcounts), std::placeholders::_2, twoN,
                   std::forward<decltype(mp)>(mp)));
 }
Beispiel #4
0
 inline
     typename std::enable_if<std::is_same<mutation_removal_policy,
                                          std::true_type>::value>::type
     gamete_cleaner(gcont_t &gametes, const mcont_t &,
                    const std::vector<uint_t> &mcounts,
                    const uint_t twoN, const mutation_removal_policy &,
                    std::true_type)
 {
     gamete_cleaner_details(
         gametes,
         [&mcounts,
          twoN](const typename gcont_t::value_type::mutation_container
                    &mc) { return find_fixation()(mc, mcounts, twoN); },
         [&mcounts,
          twoN](typename gcont_t::value_type::mutation_container &mc) {
             return gamete_cleaner_erase_remove_idiom_wrapper()(
                 mc, mcounts, twoN);
         },
         std::true_type());
 }