@Test
public void testEstimateDistanceVectors() throws Exception {

    this.setUpVerySimpleCsv();
    KDTree node;
    node = new KDTree(data, 2);
    double[] zeroArray = {0, 0, 0};
    for (Datum datum : data) {
        // Check that minimum distance is zero if the point is inside.
        assertArrayEquals(zeroArray, node.getMinMaxDistanceVectors(datum)[0].toArray(), 1e-7);
    }
    double[] farAwayPoint = {-10, 5, 21};
    Datum datum = new Datum(new ArrayList<>(), new ArrayRealVector(farAwayPoint));
    double[] minArray = {11, 0, 12};
    double[] maxArray = {21, 4, 20};
    RealVector[] minMaxVectors= node.getMinMaxDistanceVectors(datum);
    assertArrayEquals(minArray, minMaxVectors[0].toArray(), 1e-7);
    assertArrayEquals(maxArray, minMaxVectors[1].toArray(), 1e-7);
}