double[] pointData = {10.0, 12.0, 12.0, 14.0};
double[] singlePointA = {1.0};
double[] singlePointB = {2.0};
PointND point4Dimensions = new PointND(pointData);
System.out.println(point4Dimensions.distance(point4Dimensions));
// Test 1D Points:
PointND point1Da = new PointND(singlePointA);
PointND point1Db = new PointND(singlePointB);
System.out.println(point1Da.distance(point4Dimensions));
}