commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <j...@apache.org>
Subject [jira] Closed: (MATH-263) Various distance methods in "Vector3D"
Date Fri, 07 Aug 2009 09:15:14 GMT

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

Luc Maisonobe closed MATH-263.
------------------------------


closing resolved issue for 2.0 release

> Various distance methods in "Vector3D"
> --------------------------------------
>
>                 Key: MATH-263
>                 URL: https://issues.apache.org/jira/browse/MATH-263
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Gilles
>            Assignee: Luc Maisonobe
>            Priority: Minor
>
> Hi.
> As was discussed in the ML (cf. '[math] "equals" in "Vector3D"' thread), it would be
useful to add the various distance methods: L1 norm, L2 norm, L-infinity norm.
> One suggestion has been to use an enum:
>      enum Norm { L_0, L_1, L_2, L_infinity };
>      static double distance(Vector3D a, Vector3D b, Norm n) { ... }
> Another, to define several methods:
>   a.distance1(b) { ... }
>   a.distance(b) { ... }
>   a.distanceInf(b) { ... }
> At the cost of longer typing (but maybe there are other advantages) the above could also
be static.
> Best,
> Gilles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message