[ 
https://issues.apache.org/jira/browse/GEOMETRY-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17527270#comment-17527270
 ] 

Matt Juntunen commented on GEOMETRY-144:
----------------------------------------

{quote}Could different algorithms have their respective advantages and 
inconveniences? If so, shouldn't we provide access to all (e.g. through an 
enum)?
{quote}
There could be advantages to having multiple algorithms available. The 
performance of some algorithms varies with the characteristics of the inputs, 
so users could possibly choose the algorithm best suited for their situation. 
For example, the [Graham scan|https://en.wikipedia.org/wiki/Graham_scan] 
algorithm has an overall time complexity of O(n log n) but can run in O(n ) on 
presorted points.

On the other hand, the single-algorithm approach is simple and would not 
require users to learn the ins and outs of convex hull computation. Plus, if 
optimizations are discovered, they could be passed on transparently to the user 
without them needing to update their code (to select a different algorithm, for 
example).

I'm unsure which approach is best here.

{quote}
Also, why keep those algorithms in a separate maven module, rather than include 
them in module commons-geometry-euclidean (in packages 
o.a.c.geometry.euclidean.twod and o.a.c.geometry.euclidean.threed, 
respectively).
{quote}
This is the structure inherited from {{commons-math}}. If we go with a simple, 
one algorithm approach, I could easily picture it going into 
{{commons-geometry-euclidean}}. If we end up implementing multiple algorithms, 
then I think a separate module would be best, in order to avoid cluttering the 
euclidean module.



> Review API in "hull" module
> ---------------------------
>
>                 Key: GEOMETRY-144
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-144
>             Project: Commons Geometry
>          Issue Type: Task
>            Reporter: Gilles Sadowski
>            Assignee: Gilles Sadowski
>            Priority: Minor
>             Fix For: 1.1
>
>
> Review codes in the 
> [{{commons-geometry-hull}}|https://gitbox.apache.org/repos/asf?p=commons-geometry.git;a=tree;f=commons-geometry-hull;hb=HEAD]
>  module.
> (x) Minimize the public API



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to