--- a/src/basics.h Sun Jul 20 05:01:51 2014 +0300 +++ b/src/basics.h Sat Jul 26 03:43:37 2014 +0300 @@ -244,6 +244,12 @@ } template<typename T> +inline bool within (T a, T b, T c) +{ + return a >= b and a <= c; +} + +template<typename T> void removeDuplicates (T& a) { std::sort (a.begin(), a.end());