From e15b90af9fdf3fea57f33bfcd24df4d3e1ae582d Mon Sep 17 00:00:00 2001 From: Patrick Brosi Date: Mon, 7 Feb 2022 09:35:28 +0100 Subject: [PATCH] comment --- src/shapevl/Collector.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shapevl/Collector.cpp b/src/shapevl/Collector.cpp index 071fed9..f75e940 100644 --- a/src/shapevl/Collector.cpp +++ b/src/shapevl/Collector.cpp @@ -394,6 +394,8 @@ std::map Collector::getStats() { if (_distDiffs.size()) { auto i = _distDiffs.begin() + _distDiffs.size() / 2; + + // std::nth_element makes a partial sort of the first n elements std::nth_element(_distDiffs.begin(), i, _distDiffs.end()); stats["median-dist-diff"] = *i;