| 82 | } |
| 83 | |
| 84 | bool dist_sort(const DataPoint x, const DataPoint y) |
| 85 | { |
| 86 | std::vector<double> zeros(x.getDimX(), 0); |
| 87 | DataPoint origin(zeros, 0.0); |
| 88 | double x_dist = dist(x, origin); |
| 89 | double y_dist = dist(y, origin); |
| 90 | return (x_dist<y_dist); |
| 91 | } |
| 92 | |
| 93 | } // namespace SPLINTER |