mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 03:52:48 -05:00
fix pair_map
This commit is contained in:
@@ -179,7 +179,7 @@ namespace tc {
|
|||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
size_t pair_map<T>::idx(size_t i, size_t j) {
|
size_t pair_map<T>::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;
|
return j * (j + 1) / 2 + i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user