[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: [jira] [Updated] (MATH-552) MultidimensionalCounter.getCounts(int)
From: "James Bence (JIRA)" <jira () apache ! org>
Date: 2011-03-31 23:18:05
Message-ID: 855746959.26077.1301613485793.JavaMail.tomcat () hel ! zones ! apache ! org
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/MATH-552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
James Bence updated MATH-552:
-----------------------------
Attachment: MultidimensionalCounter.patch
This patch file patches the corresponding test to reveal the problem, and then \
patches the MultidimensionalCounter class to fix the problem.
> 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
> Attachments: MultidimensionalCounter.patch
>
>
> 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic