[
https://issues.apache.org/jira/browse/NUMBERS-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gilles Sadowski reopened NUMBERS-156:
-------------------------------------
[~mattjuntunen], [~aherbert],
How about the API being an {{enum}}, as per RNG-143?
Instead of
{code:java}
double n = Norms.euclidean(x, y, z);
{code}
one would write
{code:java}
double n = Norm.L2.value(x, y, z);
{code}
All the currently public static methods would thus be private. [And away with
the public "utility" class.]
I checked that it works (on the unit tests).
Nit: Javadoc is a tad repetitive (for 2 args, 3 args, array arg). ;-)
[I can consolidate it in the Javadoc of the new enum (if you agree with the
proposal).]
> SafeNorm 3D overload
> --------------------
>
> Key: NUMBERS-156
> URL: https://issues.apache.org/jira/browse/NUMBERS-156
> Project: Commons Numbers
> Issue Type: Improvement
> Reporter: Matt Juntunen
> Priority: Major
> Attachments: performance-all.png, performance-len-1-5.png,
> performance2-1-5.png, performance2-all.png, performance3-1-5.png,
> performance3-all.png, performance4-1-5.png, performance4-all.png,
> performance5-1-5.png, performance5-all.png
>
> Time Spent: 5.5h
> Remaining Estimate: 0h
>
> We should create an overload of {{SafeNorm.value}} that accepts 3 arguments
> to potentially improve performance for 3D vectors.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)