public final class TestIntersectionPerformance extends Object
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
TestIntersectionPerformance.Results
Storage for the results of a number of runs with identical numbers of shapes and vertices per shape.
|
| Modifier and Type | Method and Description |
|---|---|
static TestIntersectionPerformance.Results |
baseTest(int numShapes,
int numVertices,
double desiredHitFraction,
int numRuns,
boolean verbose,
int variant)
Perform a test.
|
static void |
main(String[] args)
Measure the performance.
|
(package private) static OTSShape |
makeNGon(int numVertices,
double r,
double cX,
double cY)
Create and return an OTSShape.
|
static OTSShape makeNGon(int numVertices, double r, double cX, double cY) throws OTSGeometryException
numVertices - int; the number of vertices in the constructed OTSShaper - double radius of the constructed OTSShapecX - double; x-coordinate of the center of the constructed OTSShapecY - double; y-coordinate of the center of the constructed OTSShapeOTSGeometryException - when the number of vertices is less than two, or the radius is 0;public static TestIntersectionPerformance.Results baseTest(int numShapes, int numVertices, double desiredHitFraction, int numRuns, boolean verbose, int variant) throws OTSGeometryException
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 useOTSGeometryException - when the number of vertices iss less than twopublic static void main(String[] args) throws OTSGeometryException, IOException
args - String[]; command line arguments (not used)OTSGeometryException - ...IOException - ...Copyright © 2014–2017 Delft University of Technology. All rights reserved.