diff options
Diffstat (limited to 'Miscellaneous/util.cpp')
-rw-r--r-- | Miscellaneous/util.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/Miscellaneous/util.cpp b/Miscellaneous/util.cpp deleted file mode 100644 index 2816c2b..0000000 --- a/Miscellaneous/util.cpp +++ /dev/null @@ -1,7 +0,0 @@ -template<typename BidirectionalIterator> // Coordinate compression -void compress(BidirectionalIterator first, BidirectionalIterator last) { - vector<pair<BidirectionalIterator, int>> tmp; - for (auto it = first; it != last; ++it) tmp.emplace_back(*it, it-first); - sort(begin(tmp), end(tmp)); - for (auto it = begin(tmp); it != end(tmp); ++it) (first+it->s) = it-begin(tmp); -} |