@@ -0,0 +1,2273 @@
+/*%0A * This file is part of ELKI:%0A * Environment for Developing KDD-Applications Supported by Index-Structures%0A *%0A * Copyright (C) 2019%0A * ELKI Development Team%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the%0A * GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program. If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0Apackage elki.clustering.hierarchical;%0A%0Aimport org.junit.Test;%0A%0Aimport elki.Algorithm;%0Aimport elki.clustering.AbstractClusterAlgorithmTest;%0Aimport elki.clustering.hierarchical.extraction.CutDendrogramByNumberOfClusters;%0Aimport elki.data.Clustering;%0Aimport elki.database.Database;%0Aimport elki.utilities.ELKIBuilder;%0A%0A/**%0A * Perform hierarchical clustering around medoids.%0A *%0A * @author Erich Schubert%0A */%0Apublic class HACAMTest extends AbstractClusterAlgorithmTest %7B%0A  @Test%0A  public void testHACAM() %7B%0A    Database db = makeSimpleDatabase(UNITTEST + %22single-link-effect.ascii%22, 638);%0A    Clustering%3C?%3E clustering = new ELKIBuilder%3C%3E(CutDendrogramByNumberOfClusters.class) //%0A        .with(CutDendrogramByNumberOfClusters.Par.MINCLUSTERS_ID, 3) //%0A        .with(Algorithm.Utils.ALGORITHM_ID, HACAM.class) //%0A        .build().autorun(db);%0A    assertFMeasure(db, clustering, 0.93998);%0A    assertClusterSizes(clustering, new int%5B%5D %7B 200, 204, 234 %7D);%0A  %7D%0A%0A  @Test%0A  public void testHACAM2() %7B%0A    Database db = makeSimpleDatabase(UNITTEST + %223clusters-and-noise-2d.csv%22, 330);%0A    Clustering%3C?%3E clustering = new ELKIBuilder%3C%3E(CutDendrogramByNumberOfClusters.class) //%0A        .with(CutDendrogramByNumberOfClusters.Par.MINCLUSTERS_ID, 3) //%0A        .with(Algorithm.Utils.ALGORITHM_ID, HACAM.class) //%0A        .build().autorun(db);%0A    assertFMeasure(db, clustering, 0.915037);%0A    assertClusterSizes(clustering, new int%5B%5D %7B 55, 119, 156 %7D);%0A  %7D%0A%7D%0A

Add unit tests for HACAM.