17 #ifndef canvas_Persistency_Common_AssnsAlgorithms_h 18 #define canvas_Persistency_Common_AssnsAlgorithms_h 23 #include "range/v3/algorithm/for_each.hpp" 24 #include "range/v3/view/all.hpp" 25 #include "range/v3/view/group_by.hpp" 26 #include "range/v3/view/map.hpp" 27 #include "range/v3/view/transform.hpp" 109 template <
typename A,
typename B,
typename D,
typename F>
113 ranges::for_each(assns | ranges::view::all |
114 ranges::view::group_by([](
auto a1,
auto a2) {
115 return a1.first ==
a2.first;
117 ranges::view::transform([](
auto pairs) {
118 return pairs | ranges::view::values;
139 template <
typename A,
typename B,
typename D,
typename F>
144 auto rights = rng | ranges::view::values;
145 auto lefts = rng | ranges::view::keys;
151 template <
typename A,
typename B,
typename D,
typename F>
155 ranges::for_each(assns | ranges::view::all |
156 ranges::view::group_by(
157 [](
auto a1,
auto a2) {
return a1.first ==
a2.first; }),
void for_each_group_with_left(art::Assns< A, B, D > const &assns, F func)
std::vector< evd::details::RawDigitInfo_t >::const_iterator begin(RawDigitCacheDataClass const &cache)
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
void for_each_group(art::Assns< A, B, D > const &assns, F func)
Helper functions to access associations in order.
void for_each_pair(art::Assns< A, B, D > const &assns, F func)