Package org.djutils.draw.line
Class ConvexHullTest
java.lang.Object
org.djutils.draw.line.ConvexHullTest
ConvexHullTest.java.
Copyright (c) 2020-2025 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUTILS License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface
Wrapper for any convex hull implementation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Problem reported by mtarik34b.static void
checkImplementations
(Map<String, ConvexHullTest.ConvexHullImplementation> implementations, List<Point2d> in, Polygon2d expectedResult) Check that all implementations of convex hull give the expected result.Create the map of all convex hull implementations.static void
Compare performance.void
Test a convex hull implementation.
-
Constructor Details
-
ConvexHullTest
public ConvexHullTest()
-
-
Method Details
-
getImplementations
Create the map of all convex hull implementations.- Returns:
- the map of all convex hull implementations
-
testConvexHull
@Test public void testConvexHull()Test a convex hull implementation. -
main
Compare performance.- Parameters:
args
- the command line arguments (not used)- Throws:
IOException
- ...
-
checkImplementations
public static void checkImplementations(Map<String, ConvexHullTest.ConvexHullImplementation> implementations, List<Point2d> in, Polygon2d expectedResult) Check that all implementations of convex hull give the expected result.- Parameters:
implementations
- the implementations to checkin
- the input for the convex hull implementationsexpectedResult
- the expected result
-
alshamraniProblem
@Test public void alshamraniProblem()Problem reported by mtarik34b.
-