You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by je...@apache.org on 2010/05/03 23:15:44 UTC

svn commit: r940617 - in /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering: canopy/CanopyClusterer.java fuzzykmeans/FuzzyKMeansOutput.java

Author: jeastman
Date: Mon May  3 21:15:42 2010
New Revision: 940617

URL: http://svn.apache.org/viewvc?rev=940617&view=rev
Log:
minor cleanup: removed unused FuzzyKMeansOutput class and one unused method from CanopyCluster

Removed:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansOutput.java
Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyClusterer.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyClusterer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyClusterer.java?rev=940617&r1=940616&r2=940617&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyClusterer.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyClusterer.java Mon May  3 21:15:42 2010
@@ -121,35 +121,6 @@ public class CanopyClusterer {
   }
 
   /**
-   * This method is used by the CanopyMapper to perform canopy inclusion tests and to emit the point and its
-   * covering canopies to the output. The CanopyCombiner will then sum the canopy points and produce the
-   * centroids.
-   * 
-   * @param point
-   *          the point to be added
-   * @param canopies
-   *          the List<Canopy> to be appended
-   * @param collector
-   *          an OutputCollector in which to emit the point
-   */
-  public void emitPointToNewCanopies(Vector point, List<Canopy> canopies, OutputCollector<Text, Vector> collector)
-      throws IOException {
-    boolean pointStronglyBound = false;
-    for (Canopy canopy : canopies) {
-      double dist = measure.distance(canopy.getCenter().getLengthSquared(), canopy.getCenter(), point);
-      if (dist < t1) {
-        canopy.emitPoint(point, collector);
-      }
-      pointStronglyBound = pointStronglyBound || (dist < t2);
-    }
-    if (!pointStronglyBound) {
-      Canopy canopy = new Canopy(point, nextCanopyId++);
-      canopies.add(canopy);
-      canopy.emitPoint(point, collector);
-    }
-  }
-
-  /**
    * Emit the point to the closest covering canopy. Used by the ClusterMapper.
    * 
    * @param point