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/06 19:38:45 UTC

svn commit: r931240 - /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/RecommendedItemsWritable.java

Author: srowen
Date: Tue Apr  6 17:38:45 2010
New Revision: 931240

URL: http://svn.apache.org/viewvc?rev=931240&view=rev
Log:
Remove the BigDecimal stuff temporarily to see how it affects Hui's output

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/RecommendedItemsWritable.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/RecommendedItemsWritable.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/RecommendedItemsWritable.java?rev=931240&r1=931239&r2=931240&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/RecommendedItemsWritable.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/RecommendedItemsWritable.java Tue Apr  6 17:38:45 2010
@@ -21,8 +21,6 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.EOFException;
 import java.io.IOException;
-import java.math.BigDecimal;
-import java.math.MathContext;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -37,8 +35,6 @@ import org.apache.mahout.cf.taste.recomm
  */
 public final class RecommendedItemsWritable implements Writable {
 
-  private static final MathContext ROUNDING = new MathContext(5);
-  
   private List<RecommendedItem> recommended;
   
   public RecommendedItemsWritable() {
@@ -100,8 +96,7 @@ public final class RecommendedItemsWrita
       }
       result.append(item.getItemID());
       result.append(':');
-      BigDecimal bd = new BigDecimal(item.getValue()).round(ROUNDING);
-      result.append(bd.toPlainString());
+      result.append(item.getValue());
     }
     result.append(']');
     return result.toString();