1#ifndef UTOPIA_CORE_ZIP_HH
2#define UTOPIA_CORE_ZIP_HH
10#include <boost/hana/ext/std/tuple.hpp>
11#include <boost/hana/transform.hpp>
12#include <boost/hana/for_each.hpp>
40template <
typename...
Iters>
46 using RefTuple = std::tuple<decltype(*std::declval<Iters>())...>;
48 using PtrTuple = std::tuple<typename std::iterator_traits<Iters>::pointer...>;
55 using value_type = std::tuple<typename std::iterator_traits<Iters>::value_type...>;
60 std::common_type_t<typename std::iterator_traits<Iters>::iterator_category...>;
75 typename std::enable_if_t<
76 std::is_base_of_v<std::bidirectional_iterator_tag,
98 typename std::enable_if_t<
99 std::is_base_of_v<std::bidirectional_iterator_tag,
113 typename std::enable_if_t<
114 std::is_base_of_v<std::random_access_iterator_tag,
127 typename std::enable_if_t<
128 std::is_base_of_v<std::random_access_iterator_tag,
141 typename std::enable_if_t<
142 std::is_base_of_v<std::random_access_iterator_tag,
154 typename std::enable_if_t<
155 std::is_base_of_v<std::random_access_iterator_tag,
168 typename std::enable_if_t<
169 std::is_base_of_v<std::random_access_iterator_tag,
182 return boost::hana::transform(
184 [](
auto&&
iter) {
return std::ref(*
iter); });
192 return boost::hana::transform(
194 [](
auto&&
iter) {
return std::ref(*
iter); });
202 return boost::hana::transform(
204 [](
auto&&
iter) {
return &(*iter); });
212 return boost::hana::transform(
214 [](
auto&&
iter) {
return &(*iter); });
265 template<
typename...
It>
276 template<
typename...
It>
288 typename std::enable_if_t<
289 std::is_base_of_v<std::random_access_iterator_tag,
302 typename std::enable_if_t<
303 std::is_base_of_v<std::random_access_iterator_tag,
316 typename std::enable_if_t<
317 std::is_base_of_v<std::random_access_iterator_tag,
330 typename std::enable_if_t<
331 std::is_base_of_v<std::random_access_iterator_tag,
353 typename std::enable_if_t<
354 std::is_base_of_v<std::random_access_iterator_tag,
412 using Tuple = std::tuple<std::reference_wrapper<Containers>...>;
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
auto adapt_zip(Adaptor &&adaptor, Containers &... containers)
Return a zip iterator built from an adapter applied to containers.
Definition zip.hh:396
Definition parallel.hh:235