[
https://issues.apache.org/jira/browse/MATH-1229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gilles resolved MATH-1229.
--------------------------
Resolution: Fixed
commit 8be87e032a8c05622148357f30bdca3c614a669f
> ResizableDoubleArray: Wrong "initialCapacity"
> ---------------------------------------------
>
> Key: MATH-1229
> URL: https://issues.apache.org/jira/browse/MATH-1229
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.5
> Reporter: Gilles
> Assignee: Gilles
> Priority: Trivial
> Fix For: 3.6
>
>
> In {{o.a.c.m.util.ResizableDoubleArray}}, in the constructor
> {code}
> public ResizableDoubleArray(double[] initialArray) {
> this(DEFAULT_INITIAL_CAPACITY,
> DEFAULT_EXPANSION_FACTOR,
> DEFAULT_CONTRACTION_DELTA + DEFAULT_EXPANSION_FACTOR,
> DEFAULT_EXPANSION_MODE,
> initialArray);
> }
> {code}
> the initial capacity should be set to the length on the input, and not to the
> hard-coded default.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)