32std::vector<std::int32_t>
mark_maximum(std::span<const T> marker, T theta,
35 if ((theta <= 0) || (theta >= 1))
36 throw std::invalid_argument(
"Theta needs to fullfill 0 < θ < 1.");
38 T max = marker.empty() ? std::numeric_limits<T>::lowest()
39 : std::ranges::max(marker);
42 auto mark = [=](T e) {
return e > theta * max; };
44 std::vector<std::int32_t> indices;
45 indices.reserve(std::ranges::count_if(marker, mark));
47 for (std::int32_t i = 0; i < static_cast<std::int32_t>(marker.size()); ++i)
53 spdlog::info(
"Marking (max) {} / {} (local) entities.", indices.size(),