|
|
@@ -15,9 +15,9 @@ import de.jplag.clustering.algorithm.GenericClusteringAlgorithm;
|
|
|
/**
|
|
|
* Interface for classes that process similarity matrices before any clustering. Classes implementing this interface
|
|
|
* must ensure that they do not produce zero rows/columns inside the similarity matrix. They must also be able to
|
|
|
- * calculate the original indices of rows/columns after use through their {@link Preprocessor#postProcessResult} method.
|
|
|
+ * calculate the original indices of rows/columns after use through their {@link ClusteringPreprocessor#postProcessResult} method.
|
|
|
*/
|
|
|
-public interface Preprocessor {
|
|
|
+public interface ClusteringPreprocessor {
|
|
|
double[][] preprocessSimilarities(double[][] similarityMatrix);
|
|
|
|
|
|
Collection<Collection<Integer>> postProcessResult(Collection<Collection<Integer>> result);
|
|
|
@@ -57,9 +57,9 @@ public interface Preprocessor {
|
|
|
public static class PreprocessedClusteringAlgorithm implements GenericClusteringAlgorithm {
|
|
|
|
|
|
private final GenericClusteringAlgorithm base;
|
|
|
- private final Preprocessor preprocessor;
|
|
|
+ private final ClusteringPreprocessor preprocessor;
|
|
|
|
|
|
- public PreprocessedClusteringAlgorithm(GenericClusteringAlgorithm base, Preprocessor preprocessor) {
|
|
|
+ public PreprocessedClusteringAlgorithm(GenericClusteringAlgorithm base, ClusteringPreprocessor preprocessor) {
|
|
|
this.base = base;
|
|
|
this.preprocessor = preprocessor;
|
|
|
}
|