commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] [Commented] (MATH-894) Spurious method call in "ResizableDoubleArray" ("o.a.c.m.util")
Date Tue, 13 Nov 2012 00:39:12 GMT


Phil Steitz commented on MATH-894:

I never liked "apply" as a name.  IIRC it goes back to the attempt at functional programming
style in the early days of the stat package.  The idea is that you "apply" a statistic to
a set of data like applying a functor.  I am fine with calling it "compute" or even "evaluate"
in RDA.  I think the change you suggest to clear() should be safe and an efficiency improvement.
 The only problem would be code that somehow depends on unused storage only at the beginning
of the array, which is not an advertised invariant.  Unit tests should pick up any problems
in the public API.
> Spurious method call in "ResizableDoubleArray" ("o.a.c.m.util")
> ---------------------------------------------------------------
>                 Key: MATH-894
>                 URL:
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>             Fix For: 3.1
> Method "addElement" should not call "contract()", as it will almost always make the storage
array shrink on the first call since it will be considered "too big" (for just storing one
> See discussion about this change in MATH-757.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message