You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by sr...@apache.org on 2010/04/07 16:42:50 UTC

svn commit: r931569 - /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TopItems.java

Author: srowen
Date: Wed Apr  7 14:42:50 2010
New Revision: 931569

URL: http://svn.apache.org/viewvc?rev=931569&view=rev
Log:
MAHOUT-370 again

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TopItems.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TopItems.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TopItems.java?rev=931569&r1=931568&r2=931569&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TopItems.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TopItems.java Wed Apr  7 14:42:50 2010
@@ -50,8 +50,8 @@ public final class TopItems {
     if ((possibleItemIDs == null) || (estimator == null)) {
       throw new IllegalArgumentException("argument is null");
     }
-    Queue<RecommendedItem> topItems = new PriorityQueue<RecommendedItem>(howMany + 1, Collections
-        .reverseOrder());
+    Queue<RecommendedItem> topItems = new PriorityQueue<RecommendedItem>(howMany + 1,
+        Collections.reverseOrder(ByValueRecommendedItemComparator.getInstance()));
     boolean full = false;
     double lowestTopValue = Double.NEGATIVE_INFINITY;
     while (possibleItemIDs.hasNext()) {