Package org.opentrafficsim.core.geometry
Class TestIntersectionPerformance
java.lang.Object
org.opentrafficsim.core.geometry.TestIntersectionPerformance
public final class TestIntersectionPerformance extends Object
Measure the performance of the OTSShape intersection method.
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version Apr 5, 2016
- Author:
- Alexander Verbraeck, Peter Knoppers
-
Method Details
-
baseTest
public static org.opentrafficsim.core.geometry.TestIntersectionPerformance.Results baseTest(int numShapes, int numVertices, double desiredHitFraction, int numRuns, boolean verbose, int variant) throws OTSGeometryExceptionPerform a test.- Parameters:
numShapes- int; number of shapes to constructnumVertices- int; number of vertices in each constructed shapedesiredHitFraction- double; intended fraction of shapes that overlap a randomly selected shapenumRuns- int; number of runs to executeverbose- boolean; if true; print details of each runvariant- int; variant of the collision tester to use- Returns:
- Results; collected statistics of this test
- Throws:
OTSGeometryException- when the number of vertices iss less than two
-
main
Measure the performance.- Parameters:
args- String[]; command line arguments (not used)- Throws:
OTSGeometryException- ...IOException- ...
-