You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alex Herbert (Jira)" <ji...@apache.org> on 2022/10/14 11:17:00 UTC

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

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

Alex Herbert updated NUMBERS-3:
-------------------------------
    Component/s: complex

> Make "RootsOfUnity" immutable
> -----------------------------
>
>                 Key: NUMBERS-3
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-3
>             Project: Commons Numbers
>          Issue Type: Improvement
>          Components: complex
>            Reporter: Gilles Sadowski
>            Assignee: Gilles Sadowski
>            Priority: Minor
>              Labels: api, immutable, serialization
>             Fix For: 1.0-beta1
>
>
> 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
(v8.20.10#820010)