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/05/11 01:27:50 UTC

[jira] [Reopened] (MATH-786) "hashCode" in "Pair" class

     [ https://issues.apache.org/jira/browse/MATH-786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles reopened MATH-786:
-------------------------


Reopening issue as caching is eventually not worth the risk of inconsistent behaviour.

                
> "hashCode" in "Pair" class
> --------------------------
>
>                 Key: MATH-786
>                 URL: https://issues.apache.org/jira/browse/MATH-786
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Trivial
>             Fix For: 3.1
>
>
> Since "Pair" is supposed to be an immutable class, couldn't we cache the "hashCode" value at construction? That would supposedly make it more efficient when used in maps.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira