public void testAlmostSameValueCluster() throws IOException {
ClusteringTestUtils.writePointsToFile(referenceData,
getTestTempFilePath("testdata/file1"), fs, conf);
DistanceMeasure measure = new EuclideanDistanceMeasure();
initData(1, 0.25, measure);
Canopy cluster = new Canopy(new DenseVector(new double[] {0, 0}), 19,
measure);
clusters.add(cluster);
List<VectorWritable> points = Lists.newArrayList();
Vector delta = new DenseVector(new double[] { 0, Double.MIN_NORMAL });
points.add(new VectorWritable(delta.clone()));
points.add(new VectorWritable(delta.clone()));
points.add(new VectorWritable(delta.clone()));
points.add(new VectorWritable(delta.clone()));
points.add(new VectorWritable(delta.clone()));
representativePoints.put(cluster.getId(), points);
CDbwEvaluator evaluator = new CDbwEvaluator(representativePoints, clusters,
measure);
assertEquals("inter cluster density", 0.0, evaluator.interClusterDensity(),
EPSILON);
assertEquals("separation", 28.970562748477143, evaluator.separation(),