incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hama Wiki] Trivial Update of "TraditionalCollaborativeFiltering" by newacct
Date Sun, 24 Jan 2010 21:10:24 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hama Wiki" for change notification.

The "TraditionalCollaborativeFiltering" page has been changed by newacct.
http://wiki.apache.org/hama/TraditionalCollaborativeFiltering?action=diff&rev1=11&rev2=12

--------------------------------------------------

        for (int i = 0; i < a.length; i++) {
          a[i] = i;
        }
-       numLeft = new BigInteger(total.toString());
+       numLeft = total;
      }
  
      public BigInteger getNumLeft() {
@@ -125, +125 @@

      }
  
      public boolean hasMore() {
-       return numLeft.compareTo(BigInteger.ZERO) == 1;
+       return numLeft.compareTo(BigInteger.ZERO) > 0;
      }
  
      public BigInteger getTotal() {
@@ -135, +135 @@

      private BigInteger getFactorial(int n) {
        BigInteger fact = BigInteger.ONE;
        for (int i = n; i > 1; i--) {
-         fact = fact.multiply(new BigInteger(Integer.toString(i)));
+         fact = fact.multiply(BigInteger.valueOf(i));
        }
        return fact;
      }
@@ -150, +150 @@

        while (a[i] == n - r + i) {
          i--;
        }
-       a[i] = a[i] + 1;
+       a[i]++;
        for (int j = i + 1; j < r; j++) {
          a[j] = a[i] + j - i;
        }

Mime
View raw message