Class Trajectory.Boundary

java.lang.Object
org.opentrafficsim.kpi.sampling.Trajectory.Boundary
Enclosing class:
Trajectory<G extends GtuData>

public class Trajectory.Boundary extends Object
Spatial or temporal boundary as a fractional position in the array.

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Field Details

    • index

      public final int index
      Rounded-down index.
    • fraction

      public final double fraction
      Fraction.
  • Constructor Details

    • Boundary

      Boundary(int index, double fraction)
      Parameters:
      index - int; rounded down index
      fraction - double; fraction
  • Method Details

    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • getValue

      public double getValue(float[] array)
      Returns the value at the boundary in the array.
      Parameters:
      array - float[]; float[] array
      Returns:
      double; value at the boundary in the array