Return-Path: Delivered-To: apmail-lucene-mahout-commits-archive@minotaur.apache.org Received: (qmail 52921 invoked from network); 20 Oct 2009 13:44:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Oct 2009 13:44:48 -0000 Received: (qmail 88210 invoked by uid 500); 20 Oct 2009 13:44:48 -0000 Delivered-To: apmail-lucene-mahout-commits-archive@lucene.apache.org Received: (qmail 88157 invoked by uid 500); 20 Oct 2009 13:44:47 -0000 Mailing-List: contact mahout-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mahout-dev@lucene.apache.org Delivered-To: mailing list mahout-commits@lucene.apache.org Received: (qmail 88147 invoked by uid 99); 20 Oct 2009 13:44:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Oct 2009 13:44:45 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Oct 2009 13:44:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7C0F12388904; Tue, 20 Oct 2009 13:44:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r827438 - /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java Date: Tue, 20 Oct 2009 13:44:21 -0000 To: mahout-commits@lucene.apache.org From: robinanil@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091020134421.7C0F12388904@eris.apache.org> Author: robinanil Date: Tue Oct 20 13:44:21 2009 New Revision: 827438 URL: http://svn.apache.org/viewvc?rev=827438&view=rev Log: Changing MAHOUT FPGrowth:growth for-loop to while-loop Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java?rev=827438&r1=827437&r2=827438&view=diff ============================================================================== --- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java (original) +++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java Tue Oct 20 13:44:21 2009 @@ -218,8 +218,8 @@ outputCollector.collect(attribute, frequentPatterns); minSupportValue = Math.max(minSupportValue, minSupport.intValue() / 2); - log.info("Found {} Patterns with Least Support {}", Patterns - .get(attribute).count(), Patterns.get(attribute).leastSupport()); + log.info("Found {} Patterns with Least Support {}", Patterns.get( + attribute).count(), Patterns.get(attribute).leastSupport()); } log.info("Tree Cache: First Level: Cache hits={} Cache Misses={}", treeCache.getHits(), treeCache.getMisses()); @@ -321,8 +321,8 @@ currentAttribute); if (i < 0) return frequentPatterns; - - for (int j = tree.getHeaderTableCount(); i < j; i++) { + int j = tree.getHeaderTableCount(); + while (i < j) { int attribute = tree.getAttributeAtIndex(i); long count = tree.getHeaderSupportCount(attribute); if (count < minSupportMutable.intValue()) @@ -352,7 +352,7 @@ minSupportMutable.setValue(frequentPatterns.leastSupport()); } } - + i++; } return frequentPatterns;