@Test public void testContinuousDistance() { Assert.assertEquals(distance.calc(denseVector1, denseVector2), 12.0, 0.01); Assert.assertEquals(distance.calc(denseVector1.getData(), denseVector2.getData()), 12.0, 0.01); Assert.assertEquals(distance.calc(denseVector1, sparseVector1), 10.5, 0.01); Assert.assertEquals(distance.calc(sparseVector1, sparseVector2), 0.8, 0.01); Assert.assertEquals(distance.calc(sparseVector1, denseVector2), 16.5, 0.01); }
@Override public double calc(double[] vec1, double[] vec2) { return calc(vec1, 0, vec2, 0, vec1.length); }
ManHattanDistance extends FastDistance { @Override public double calc(double[] vec1, double[] vec2) { return calc(vec1, 0, vec2, 0, vec1.length); } }
ManHattanDistance extends FastDistance { @Override public double calc(double[] vec1, double[] vec2) { return calc(vec1, 0, vec2, 0, vec1.length); }  }
ManHattanDistance extends FastDistance { @Override public double calc(double[] vec1, double[] vec2) { return calc(vec1, 0, vec2, 0, vec1.length); }  @Override double calc(double[] vec1, double[] vec2); @Override double calc(Vector vec1, Vector vec2); @Override void updateLabel(FastDistanceData data); }
ManHattanDistance extends FastDistance { @Override public double calc(double[] vec1, double[] vec2) { return calc(vec1, 0, vec2, 0, vec1.length); }  @Override double calc(double[] vec1, double[] vec2); @Override double calc(Vector vec1, Vector vec2); @Override void updateLabel(FastDistanceData data);  }