C++ (Qt)template <class T1, class T2>void PackContainer( T1 & vec, T2 & remapIndex ){ ...}
C++ (Qt)#define XY_TOLERANCE 1.0e-5finline bool CanMerge( const Point2D & p0, const Point2D & p1 ){ return (p1 - p0).length() < XY_TOLERANCE;}
bool test = CanMerge(vec[i], vec[j]); // j > i
vec[i].x - vec[base].x > TOLERANCE; // i > base