Gilles created MATH-1229:
----------------------------
Summary: 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)