valType findDistance(const point<valType, dim>& lhs, const point<valType, dim>& rhs){ valType dist = 0.0; size_t dimIndex = dim; while(dimIndex--){ valType t = lhs.at(dimIndex) - rhs.at(dimIndex); dist += t*t; } return sqrt(dist); }
bool operator()(const point<valType, dim>& lhs, const point<valType, dim>& rhs){ return lhs.at(index) < rhs.at(index); }