1 #ifndef cetlib_container_algorithms_h 2 #define cetlib_container_algorithms_h 18 template <
class FwdCont,
class Func>
20 template <
class FwdCont,
class Func>
21 auto for_all(FwdCont
const&, Func);
24 template <
class FwdCont,
class FwdIter>
26 template <
class FwdCont,
class FwdIter>
27 auto copy_all(FwdCont
const&, FwdIter);
30 template <
class FwdCont,
class FwdIter,
class Pred>
32 template <
class FwdCont,
class FwdIter,
class Pred>
36 template <
class FwdCont,
class Datum>
38 template <
class FwdCont,
class Datum>
40 template <
class FwdCont,
class Datum>
44 template <
class FwdCont,
class Datum>
48 template <
class FwdCont,
class Datum>
50 template <
class FwdCont,
class Datum>
52 template <
class FwdCont,
class Datum,
class Pred>
54 template <
class FwdCont,
class Datum,
class Pred>
58 template <
class RandCont>
60 template <
class RandCont,
class Pred>
64 template <
class RandCont>
66 template <
class RandCont,
class Pred>
71 template <
class Container,
class OutputIt,
class UnaryOp>
73 template <
class Container,
class OutputIt,
class UnaryOp>
76 template <
class Container1,
class Container2,
class OutputIt,
class BinaryOp>
77 auto transform_all(Container1&, Container2&, OutputIt, BinaryOp);
78 template <
class Container1,
class Container2,
class OutputIt,
class BinaryOp>
79 auto transform_all(Container1
const&, Container2
const&, OutputIt, BinaryOp);
81 template <
class FwdCont,
class Func>
83 template <
class FwdCont,
class Func>
88 template <
class FwdCont,
class Func>
94 return std::for_each(
begin(s),
end(s), f);
97 template <
class FwdCont,
class Func>
107 template <
class FwdCont,
class Func>
118 template <
class FwdCont,
class Func>
123 for (
auto const&
e : s) {
130 template <
class FwdCont,
class FwdIter>
139 template <
class FwdCont,
class FwdIter>
149 template <
class FwdCont,
class FwdIter,
class Pred>
155 return std::copy_if(
begin(s),
end(s), it, p);
158 template <
class FwdCont,
class FwdIter,
class Pred>
164 return std::copy_if(
cbegin(s),
cend(s), it, p);
168 template <
class FwdCont,
class Datum>
174 return std::find(
begin(s),
end(s), d);
177 template <
class FwdCont,
class Datum>
187 template <
class FwdCont,
class Datum>
193 return std::find(
cbegin(s),
cend(s), d) != s.end();
197 template <
class FwdCont,
class Datum>
203 return std::binary_search(
cbegin(s),
cend(s), d);
207 template <
class FwdCont,
class Datum>
213 return std::lower_bound(
begin(s),
end(s), d);
216 template <
class FwdCont,
class Datum>
222 return std::lower_bound(
cbegin(s),
cend(s), d);
225 template <
class FwdCont,
class Datum,
class Pred>
231 return std::lower_bound(
begin(s),
end(s), d, p);
234 template <
class FwdCont,
class Datum,
class Pred>
240 return std::lower_bound(
cbegin(s),
cend(s), d, p);
244 template <
class RandCont>
253 template <
class RandCont,
class Pred>
263 template <
class RandCont>
272 template <
class RandCont,
class Pred>
278 std::stable_sort(
begin(s),
end(s), p);
282 template <
class Container,
class OutputIt,
class UnaryOp>
288 return std::transform(
begin(in),
end(in), out, unary_op);
291 template <
class Container,
class OutputIt,
class UnaryOp>
297 return std::transform(
cbegin(in),
cend(in), out, unary_op);
300 template <
class Container1,
class Container2,
class OutputIt,
class BinaryOp>
309 return std::transform(
begin(in1),
end(in1),
begin(in2), out, binary_op);
312 template <
class Container1,
class Container2,
class OutputIt,
class BinaryOp>
315 Container2
const& in2,
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
void stable_sort_all(RandCont &)
auto lower_bound_all(FwdCont &, Datum const &)
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
auto copy_if_all(FwdCont &, FwdIter, Pred)
void for_all_with_index(FwdCont &, Func)
void sort_all(RandCont &)
bool search_all(FwdCont const &, Datum const &)
auto transform_all(Container &, OutputIt, UnaryOp)
auto copy_all(FwdCont &, FwdIter)
bool binary_search_all(FwdCont const &, Datum const &)
auto find_in_all(FwdCont &, Datum const &)
auto for_all(FwdCont &, Func)
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.