Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
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.