summaryrefslogtreecommitdiff
path: root/test/geometry/antipodalPoints.cpp
diff options
context:
space:
mode:
authorGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 21:17:29 +0100
committerGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 21:17:29 +0100
commit1880ccb6d85c6eb79e724593457877bab431951c (patch)
tree23eddd5bd0b29b3024e170a5ef9023eda9226ab5 /test/geometry/antipodalPoints.cpp
parente95f59debd69ee7d45d5c966ce466d23264e1c3c (diff)
get rid of all() and sz()
Diffstat (limited to 'test/geometry/antipodalPoints.cpp')
-rw-r--r--test/geometry/antipodalPoints.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/geometry/antipodalPoints.cpp b/test/geometry/antipodalPoints.cpp
index d20dfb6..013f43c 100644
--- a/test/geometry/antipodalPoints.cpp
+++ b/test/geometry/antipodalPoints.cpp
@@ -9,7 +9,7 @@ constexpr ll EPS = 0;
#include "../geometry.h"
vector<pair<int, int>> naive(vector<pt> ps) {
- ll n = sz(ps);
+ ll n = ssize(ps);
auto test = [&](int i, int j){
if (dot(ps[j] - ps[i], ps[i - 1] - ps[i]) <= 0) return false;
if (dot(ps[j] - ps[i], ps[i + 1] - ps[i]) <= 0) return false;
@@ -34,13 +34,13 @@ void stress_test(ll range) {
auto got = antipodalPoints(ps);
for (auto& [a, b] : got) if (a > b) swap(a, b);
- sort(all(got));
+ ranges::sort(got);
auto expected = naive(ps);
for (auto& [a, b] : expected) if (a > b) swap(a, b);
for (auto x : expected) {
- auto it = lower_bound(all(got), x);
+ auto it = ranges::lower_bound(got, x);
if (it == got.end() || *it != x) cerr << "error" << FAIL;
}
queries += n;
@@ -58,7 +58,7 @@ void performance_test() {
auto got = antipodalPoints(ps);
t.stop();
- hash_t hash = sz(got);
+ hash_t hash = ssize(got);
if (t.time > 50) cerr << "too slow: " << t.time << FAIL;
cerr << "tested performance: " << t.time << "ms (hash: " << hash << ")" << endl;
}