Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 72947 invoked from network); 31 Mar 2011 22:44:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Mar 2011 22:44:45 -0000 Received: (qmail 21357 invoked by uid 500); 31 Mar 2011 22:44:45 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 21296 invoked by uid 500); 31 Mar 2011 22:44:45 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 21287 invoked by uid 99); 31 Mar 2011 22:44:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Mar 2011 22:44:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Mar 2011 22:44:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B2FF18C028 for ; Thu, 31 Mar 2011 22:44:05 +0000 (UTC) Date: Thu, 31 Mar 2011 22:44:05 +0000 (UTC) From: "James Bence (JIRA)" To: issues@commons.apache.org Message-ID: <1472946965.25955.1301611445730.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2104792113.25935.1301611085722.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (MATH-552) MultidimensionalCounter.getCounts(int) returns wrong array of indices MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MATH-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014253#comment-13014253 ] James Bence commented on MATH-552: ---------------------------------- I am working on a patch and some tests. > MultidimensionalCounter.getCounts(int) returns wrong array of indices > --------------------------------------------------------------------- > > Key: MATH-552 > URL: https://issues.apache.org/jira/browse/MATH-552 > Project: Commons Math > Issue Type: Bug > Affects Versions: 2.2 > Environment: Java 1.6 > Reporter: James Bence > Priority: Minor > > MultidimensionalCounter counter = new MultidimensionalCounter(2, 4); > for (Integer i : counter) { > int[] x = counter.getCounts(i); > System.out.println(i + " " + Arrays.toString(x)); > } > Output is: > 0 [0, 0] > 1 [0, 1] > 2 [0, 2] > 3 [0, 2] <=== should be [0, 3] > 4 [1, 0] > 5 [1, 1] > 6 [1, 2] > 7 [1, 2] <=== should be [1, 3] -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira