piecewiseLinearApproximation_ApproximateNearestEuclideanN - first version of our general-case PLFN approx algorithm