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

Gilles Sadowski commented on GEOMETRY-144:
------------------------------------------

{quote}Having thought on this some more, I believe the best way to go here 
would be to just implement a single algorithm [...]
{quote}
If we go that way, I'd agree that
{quote}[it] would make sense to offer the functionality of *[the algorithm]* 
through static factory methods in ConvexArea and ConvexVolume [...]
{quote}
But if we intend to provide several algorithms, then it would gradually lead to 
any and all functionality related to {{ConvexVolume}} to be defined there.
In that case, it seems cleaner to have an enum that groups all "generators" 
(like [{{RandomSource}} in "Commons 
RNG"|https://commons.apache.org/proper/commons-rng/commons-rng-simple/javadocs/api-1.5/org/apache/commons/rng/simple/RandomSource.html]).

If there is only one implementation, we can encapsulate it in 
{{{}ConvexVolume{}}}. When others are added later, {{ConvexHull}} would still 
provide the *default* implementation (with *no guarantee* that the same 
algorithm would be chosen as the default from one release to the next).

Include a default in {{ConvexVolume}} would imply the removal of the 
"commons-geometry-hull" module (to prevent cyclic dependencies).

> 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.10#820010)

Reply via email to