Return-Path: Delivered-To: apmail-incubator-hama-commits-archive@minotaur.apache.org Received: (qmail 9981 invoked from network); 24 Jan 2010 21:10:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jan 2010 21:10:48 -0000 Received: (qmail 49822 invoked by uid 500); 24 Jan 2010 21:10:48 -0000 Delivered-To: apmail-incubator-hama-commits-archive@incubator.apache.org Received: (qmail 49792 invoked by uid 500); 24 Jan 2010 21:10:48 -0000 Mailing-List: contact hama-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hama-dev@incubator.apache.org Delivered-To: mailing list hama-commits@incubator.apache.org Received: (qmail 49781 invoked by uid 99); 24 Jan 2010 21:10:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jan 2010 21:10:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jan 2010 21:10:46 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id E511716E25 for ; Sun, 24 Jan 2010 21:10:24 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Sun, 24 Jan 2010 21:10:24 -0000 Message-ID: <20100124211024.17055.67378@eos.apache.org> Subject: =?utf-8?q?=5BHama_Wiki=5D_Trivial_Update_of_=22TraditionalCollaborativeFi?= =?utf-8?q?ltering=22_by_newacct?= X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hama Wiki" for chan= ge notification. The "TraditionalCollaborativeFiltering" page has been changed by newacct. http://wiki.apache.org/hama/TraditionalCollaborativeFiltering?action=3Ddiff= &rev1=3D11&rev2=3D12 -------------------------------------------------- for (int i =3D 0; i < a.length; i++) { a[i] =3D i; } - numLeft =3D new BigInteger(total.toString()); + numLeft =3D total; } = public BigInteger getNumLeft() { @@ -125, +125 @@ } = public boolean hasMore() { - return numLeft.compareTo(BigInteger.ZERO) =3D=3D 1; + return numLeft.compareTo(BigInteger.ZERO) > 0; } = public BigInteger getTotal() { @@ -135, +135 @@ private BigInteger getFactorial(int n) { BigInteger fact =3D BigInteger.ONE; for (int i =3D n; i > 1; i--) { - fact =3D fact.multiply(new BigInteger(Integer.toString(i))); + fact =3D fact.multiply(BigInteger.valueOf(i)); } return fact; } @@ -150, +150 @@ while (a[i] =3D=3D n - r + i) { i--; } - a[i] =3D a[i] + 1; + a[i]++; for (int j =3D i + 1; j < r; j++) { a[j] =3D a[i] + j - i; }