Package org.djutils.draw.line
Class ConvexHullTest
- java.lang.Object
-
- org.djutils.draw.line.ConvexHullTest
-
public class ConvexHullTest extends Object
ConvexHullTest.java.Copyright (c) 2020-2023 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
ConvexHullTest.ConvexHullImplementation
Wrapper for any convex hull implementation.
-
Constructor Summary
Constructors Constructor Description ConvexHullTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
checkImplementations(Map<String,ConvexHullTest.ConvexHullImplementation> implementations, List<Point2d> in, Polygon2d expectedResult)
Check that all implementations of convex hull give the expected result.static Map<String,ConvexHullTest.ConvexHullImplementation>
getImplementations()
Create the map of all convex hull implementations.static void
main(String[] args)
Compare performance.void
testConvexHull()
Test a convex hull implementation.
-
-
-
Method Detail
-
getImplementations
public static Map<String,ConvexHullTest.ConvexHullImplementation> getImplementations()
Create the map of all convex hull implementations.- Returns:
- Map<String, ConvexHullImplementation>; the map of all convex hull implementations
-
testConvexHull
public void testConvexHull()
Test a convex hull implementation.
-
main
public static void main(String[] args) throws IOException
Compare performance.- Parameters:
args
- String[]; 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
- Map<String, ConvexHullImplementation>; the implementations to checkin
- List<Point2d>; the input for the convex hull implementationsexpectedResult
- Polygon2d; the expected result
-
-