void print_point(const KMPoint &p, std::ostream &out) { out << "[ "; for (unsigned int i = 0; i < p.size(); i++) { out << std::setw(8) << p[i] << " "; } out << " ]"; }
IMPSTATISTICS_BEGIN_INTERNAL_NAMESPACE double km_distance2(const KMPoint &p, const KMPoint &q) { double dist = 0; // IMP_INTERNAL_CHECK(); - TODO L add check for high checks level for (unsigned int i = 0; i < p.size(); i++) { dist += (p[i] - q[i]) * (p[i] - q[i]); } return dist; }
bool KMRectangle::is_inside(const KMPoint &p) { for (unsigned int i = 0; i < p.size(); i++) { if ((p[i] < lo_[i]) || (p[i] > hi_[i])) return false; } return true; }
bool km_is_equal(const KMPoint &p, const KMPoint &q) { for (unsigned int i = 0; i < p.size(); i++) { if (p[i] != q[i]) return false; } return true; }