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 2017/01/21 18:16:26 UTC

[jira] [Resolved] (NUMBERS-3) Make "RootsOfUnity" immutable

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

Gilles resolved NUMBERS-3.
--------------------------
    Resolution: Fixed

commit b206d9c80c95433d530e639308e38b92c7e3fdef

> Make "RootsOfUnity" immutable
> -----------------------------
>
>                 Key: NUMBERS-3
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-3
>             Project: Commons Numbers
>          Issue Type: Improvement
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>              Labels: api, immutable, serialization
>
> The computation could be performed in the constructor, allowing
> all fields to be made "final".
> Synchronized methods would become unnecessary to ensure thread-safety, and numerous checks (to guard against a non-initialized instance) could be dropped.
> Overall the code can be simplified at the cost of dropping the "clockwise" store (see current version).
> An accessor method to get the each of the roots as a {{Complex}} should be provided, to replace the current separate retrieval of its real and imaginary parts.
> Also this class should not be {{Serializable}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)