summaryrefslogtreecommitdiff
path: root/src/de/lmu/ifi/dbs/elki/algorithm/clustering/SNNClustering.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/algorithm/clustering/SNNClustering.java')
-rw-r--r--src/de/lmu/ifi/dbs/elki/algorithm/clustering/SNNClustering.java66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/algorithm/clustering/SNNClustering.java b/src/de/lmu/ifi/dbs/elki/algorithm/clustering/SNNClustering.java
index 3bdb224e..3bde2932 100644
--- a/src/de/lmu/ifi/dbs/elki/algorithm/clustering/SNNClustering.java
+++ b/src/de/lmu/ifi/dbs/elki/algorithm/clustering/SNNClustering.java
@@ -1,26 +1,27 @@
package de.lmu.ifi.dbs.elki.algorithm.clustering;
-/*
-This file is part of ELKI:
-Environment for Developing KDD-Applications Supported by Index-Structures
-
-Copyright (C) 2011
-Ludwig-Maximilians-Universität München
-Lehr- und Forschungseinheit für Datenbanksysteme
-ELKI Development Team
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Affero General Public License for more details.
-You should have received a copy of the GNU Affero General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2011
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
import java.util.ArrayList;
import java.util.Iterator;
@@ -40,7 +41,6 @@ import de.lmu.ifi.dbs.elki.database.ids.DBIDUtil;
import de.lmu.ifi.dbs.elki.database.ids.ModifiableDBIDs;
import de.lmu.ifi.dbs.elki.database.query.similarity.SimilarityQuery;
import de.lmu.ifi.dbs.elki.database.relation.Relation;
-import de.lmu.ifi.dbs.elki.distance.distancevalue.Distance;
import de.lmu.ifi.dbs.elki.distance.distancevalue.IntegerDistance;
import de.lmu.ifi.dbs.elki.distance.similarityfunction.SharedNearestNeighborSimilarityFunction;
import de.lmu.ifi.dbs.elki.logging.Logging;
@@ -71,14 +71,12 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
*
* @apiviz.uses SharedNearestNeighborSimilarityFunction
*
- * @param <O> the type of DatabaseObject the algorithm is applied on
- * @param <D> the type of Distance used for the preprocessing of the shared
- * nearest neighbors neighborhood lists
+ * @param <O> the type of Object the algorithm is applied on
*/
@Title("SNN: Shared Nearest Neighbor Clustering")
@Description("Algorithm to find shared-nearest-neighbors-density-connected sets in a database based on the " + "parameters 'minPts' and 'epsilon' (specifying a volume). " + "These two parameters determine a density threshold for clustering.")
@Reference(authors = "L. Ertöz, M. Steinbach, V. Kumar", title = "Finding Clusters of Different Sizes, Shapes, and Densities in Noisy, High Dimensional Data", booktitle = "Proc. of SIAM Data Mining (SDM), 2003", url = "http://www.siam.org/meetings/sdm03/proceedings/sdm03_05.pdf")
-public class SNNClustering<O, D extends Distance<D>> extends AbstractAlgorithm<Clustering<Model>> implements ClusteringAlgorithm<Clustering<Model>> {
+public class SNNClustering<O> extends AbstractAlgorithm<Clustering<Model>> implements ClusteringAlgorithm<Clustering<Model>> {
/**
* The logger for this class.
*/
@@ -124,7 +122,7 @@ public class SNNClustering<O, D extends Distance<D>> extends AbstractAlgorithm<C
/**
* The similarity function for the shared nearest neighbor similarity.
*/
- private SharedNearestNeighborSimilarityFunction<O, D> similarityFunction;
+ private SharedNearestNeighborSimilarityFunction<O> similarityFunction;
/**
* Constructor.
@@ -133,7 +131,7 @@ public class SNNClustering<O, D extends Distance<D>> extends AbstractAlgorithm<C
* @param epsilon Epsilon
* @param minpts Minpts
*/
- public SNNClustering(SharedNearestNeighborSimilarityFunction<O, D> similarityFunction, IntegerDistance epsilon, int minpts) {
+ public SNNClustering(SharedNearestNeighborSimilarityFunction<O> similarityFunction, IntegerDistance epsilon, int minpts) {
super();
this.similarityFunction = similarityFunction;
this.epsilon = epsilon;
@@ -310,18 +308,20 @@ public class SNNClustering<O, D extends Distance<D>> extends AbstractAlgorithm<C
* @author Erich Schubert
*
* @apiviz.exclude
+ *
+ * @param <O> object type
*/
- public static class Parameterizer<O, D extends Distance<D>> extends AbstractParameterizer {
+ public static class Parameterizer<O> extends AbstractParameterizer {
protected IntegerDistance epsilon;
protected int minpts;
- private SharedNearestNeighborSimilarityFunction<O, D> similarityFunction;
+ private SharedNearestNeighborSimilarityFunction<O> similarityFunction;
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
- Class<SharedNearestNeighborSimilarityFunction<O, D>> cls = ClassGenericsUtil.uglyCastIntoSubclass(SharedNearestNeighborSimilarityFunction.class);
+ Class<SharedNearestNeighborSimilarityFunction<O>> cls = ClassGenericsUtil.uglyCastIntoSubclass(SharedNearestNeighborSimilarityFunction.class);
similarityFunction = config.tryInstantiate(cls);
DistanceParameter<IntegerDistance> epsilonP = new DistanceParameter<IntegerDistance>(EPSILON_ID, IntegerDistance.FACTORY);
@@ -336,8 +336,8 @@ public class SNNClustering<O, D extends Distance<D>> extends AbstractAlgorithm<C
}
@Override
- protected SNNClustering<O, D> makeInstance() {
- return new SNNClustering<O, D>(similarityFunction, epsilon, minpts);
+ protected SNNClustering<O> makeInstance() {
+ return new SNNClustering<O>(similarityFunction, epsilon, minpts);
}
}
} \ No newline at end of file