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-2019 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 Summary

    Modifier and Type Method Description
    static org.opentrafficsim.core.geometry.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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 OTSGeometryException
      Perform a test.
      Parameters:
      numShapes - int; number of shapes to construct
      numVertices - int; number of vertices in each constructed shape
      desiredHitFraction - double; intended fraction of shapes that overlap a randomly selected shape
      numRuns - int; number of runs to execute
      verbose - boolean; if true; print details of each run
      variant - 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

      public static void main​(String[] args) throws OTSGeometryException, IOException
      Measure the performance.
      Parameters:
      args - String[]; command line arguments (not used)
      Throws:
      OTSGeometryException - ...
      IOException - ...