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/02/22 16:58:42 UTC

svn commit: r912639 - /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java

Author: srowen
Date: Mon Feb 22 15:58:42 2010
New Revision: 912639

URL: http://svn.apache.org/viewvc?rev=912639&view=rev
Log:
Go back to doing nothing when d=0

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java?rev=912639&r1=912638&r2=912639&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java Mon Feb 22 15:58:42 2010
@@ -170,10 +170,9 @@
                     Reporter rep) throws IOException {
       this.out = out;
       double d = scale(v);
-      //if(d == 0) return;
       if (d == 1.0) {
         outputVector.assign(v.get(), Functions.plus);
-      } else {
+      } else if (d != 0.0) {
         outputVector.assign(v.get(), Functions.plusMult(d));
       }
     }