From 576e277d4172f2762b67167314e48efedf4c0bd7 Mon Sep 17 00:00:00 2001 From: David Allemang Date: Tue, 13 Sep 2022 22:23:10 -0400 Subject: [PATCH] fix pair_map --- tc/include/tc/pair_map.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/include/tc/pair_map.hpp b/tc/include/tc/pair_map.hpp index 614f639..d282846 100644 --- a/tc/include/tc/pair_map.hpp +++ b/tc/include/tc/pair_map.hpp @@ -179,7 +179,7 @@ namespace tc { template size_t pair_map::idx(size_t i, size_t j) { - if (i < j) std::swap(i, j); + if (i > j) std::swap(i, j); return j * (j + 1) / 2 + i; }