[ https://issues.apache.org/jira/browse/GEOMETRY-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17526836#comment-17526836 ]
Matt Juntunen edited comment on GEOMETRY-144 at 4/23/22 11:57 AM: ------------------------------------------------------------------ The current implementation uses an algorithm-specific design. For example, there is a public class named {{MonotoneChain}} that implements the "monotone chain" 2D convex hull algorithm. I'm wondering if we should abandon this in favor of providing just a single well-rounded algorithm option. For example, the API could simply be {code:java} public final class ConvexHulls { public static ConvexHull2D create2D(Collection<Vector2D> pts) { // ... } public static ConvexHull3D create3D(Collection<Vector3D> pts) { // ... } } {code} This relieves users of the need to be knowledgeable about convex hull algorithms and gives us the flexibility to swap out the algorithm later on if needed. was (Author: mattjuntunen): The current implementation uses an algorithm-specific design. For example, there is a public class named {{MonotoneChain}} that implements the "monotone chain" 2D convex hull algorithm. I'm wondering if we should abandon this in favor of providing just a single well-rounded algorithm option. For example, the API could simply be {code:java} public final class ConvexHulls { public static ConvexHull2D create2D(Collection<Vector2D> pts) { // ... } public static ConvexHull2D create3D(Collection<Vector3D> pts) { // ... } } {code} This relieves users of the need to be knowledgeable about convex hull algorithms and gives us the flexibility to swap out the algorithm later on if needed. > 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)