You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2012/11/14 13:30:12 UTC

[jira] [Commented] (MATH-894) Cleanup of "ResizableDoubleArray" ("o.a.c.m.util")

    [ https://issues.apache.org/jira/browse/MATH-894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497051#comment-13497051 ] 

Gilles commented on MATH-894:
-----------------------------

Shall we make the "expansionFactor", "contractionCriteria"[1] and "expansionMode" fields "final" (and hence deprecate the corresponding setters)? 
I don't really see the usefulness of being able to fiddle with these values during an object's lifetime. I'd rather add copy constructors that would allow to set those parameters to values different from the copied instance.

[1] Shouldn't this variable be named "contractionCriterion"?

                
> Cleanup of "ResizableDoubleArray" ("o.a.c.m.util")
> --------------------------------------------------
>
>                 Key: MATH-894
>                 URL: https://issues.apache.org/jira/browse/MATH-894
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>
> 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 element).
> See discussion about this change in MATH-757.
> Miscellaneous code modifications are also proposed in order to improve encapsulation.

--
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: http://www.atlassian.com/software/jira