2 #include "boost/algorithm/string.hpp" 6 #include "range/v3/view.hpp" 15 assert(not history.
empty());
16 return std::accumulate(
19 history.
begin()->processName(),
22 result +=
config.processName();
44 collapsed_histories(std::vector<std::string>
const& all_process_names)
46 assert(not
empty(all_process_names));
48 std::vector<std::string>
result;
49 auto candidate =
cbegin(all_process_names);
50 auto const end =
cend(all_process_names);
52 if (
test->find(*candidate) != 0) {
53 result.push_back(*candidate);
56 result.push_back(*candidate);
61 transform_to_final_result(std::vector<std::string>
const& collapsed)
63 std::vector<std::vector<std::string>>
result;
64 for (
auto const& process_names_str : collapsed) {
65 std::vector<std::string> process_names;
66 boost::split(process_names, process_names_str, boost::is_any_of(
"\n"));
67 result.push_back(
move(process_names));
73 std::vector<std::vector<std::string>>
76 std::vector<std::string> all_process_names;
77 all_process_names.reserve(histories.size());
79 all_process_names.push_back(stringified_process_names(history));
85 auto const e =
end(all_process_names);
86 auto const new_end = std::unique(
begin(all_process_names),
e);
87 all_process_names.erase(new_end,
e);
89 auto const collapsed = collapsed_histories(all_process_names);
90 return transform_to_final_result(collapsed);
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
const_iterator end() const
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
const_iterator begin() const
std::vector< std::vector< std::string > > orderedProcessNamesCollection(ProcessHistoryMap const &pHistMap)
std::map< ProcessHistoryID const, ProcessHistory > ProcessHistoryMap
void sort_all(RandCont &)
yes & test(std::ostream &)
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
void split(std::string const &s, char c, OutIter dest)
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.