Class PerceivedConflictFull.Width
java.lang.Object
org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull.Width
- Enclosing class:
- PerceivedConflictFull
Width progression of conflict.
Copyright (c) 2013-2026 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
-
Constructor Summary
ConstructorsConstructorDescriptionWidth(double[] fractions, org.djunits.value.vdouble.vector.LengthVector width) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.djunits.value.vdouble.scalar.LengthgetWidth(double fraction) Returns the width at the given fraction.static PerceivedConflictFull.Widthlinear(org.djunits.value.vdouble.scalar.Length startWidth, org.djunits.value.vdouble.scalar.Length endWidth) Returns a linear width progression.
-
Constructor Details
-
Width
public Width(double[] fractions, org.djunits.value.vdouble.vector.LengthVector width) Constructor.- Parameters:
fractions- fractions, from 0 to 1width- vector of equal length with widths
-
-
Method Details
-
getWidth
public org.djunits.value.vdouble.scalar.Length getWidth(double fraction) throws ValueRuntimeException Returns the width at the given fraction.- Parameters:
fraction- fraction from 0 to 1- Returns:
- width at the given fraction
- Throws:
ValueRuntimeException- when index is out of bounds
-
linear
public static PerceivedConflictFull.Width linear(org.djunits.value.vdouble.scalar.Length startWidth, org.djunits.value.vdouble.scalar.Length endWidth) Returns a linear width progression.- Parameters:
startWidth- start widthendWidth- end width- Returns:
- linear width progression
-