Class Distributions
- java.lang.Object
-
- org.opentrafficsim.core.network.factory.xml.units.Distributions
-
public final class Distributions extends Object
Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Jul 23, 2015
- Author:
- Alexander Verbraeck
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ContinuousDistDoubleScalar.Rel<Duration,DurationUnit>
parseDurationDist(String s)
Parse a relative time distribution, e.g.static ContinuousDistDoubleScalar.Rel<Length,LengthUnit>
parseLengthDist(String s)
Parse a relative length distribution, e.g.static ContinuousDistDoubleScalar.Abs<Position,PositionUnit,LengthUnit>
parsePositionDist(String s)
Parse an absolute length distribution, e.g.static ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit>
parseSpeedDist(String s)
Parse a relative speed distribution, e.g.static ContinuousDistDoubleScalar.Abs<Time,TimeUnit,DurationUnit>
parseTimeDist(String s)
Parse an absolute time distribution, e.g.
-
-
-
Method Detail
-
parseLengthDist
public static ContinuousDistDoubleScalar.Rel<Length,LengthUnit> parseLengthDist(String s) throws NetworkException
Parse a relative length distribution, e.g.UNIFORM(1, 3) m
.- Parameters:
s
- String; the string to be parsed.- Returns:
- a typed continuous random distribution.
- Throws:
NetworkException
- in case of a parse error.
-
parsePositionDist
public static ContinuousDistDoubleScalar.Abs<Position,PositionUnit,LengthUnit> parsePositionDist(String s) throws NetworkException
Parse an absolute length distribution, e.g.UNIFORM(1, 3) m
.- Parameters:
s
- String; the string to be parsed.- Returns:
- a typed continuous random distribution.
- Throws:
NetworkException
- in case of a parse error.
-
parseDurationDist
public static ContinuousDistDoubleScalar.Rel<Duration,DurationUnit> parseDurationDist(String s) throws NetworkException
Parse a relative time distribution, e.g.UNIFORM(1, 3) s
.- Parameters:
s
- String; the string to be parsed.- Returns:
- a typed continuous random distribution.
- Throws:
NetworkException
- in case of a parse error.
-
parseTimeDist
public static ContinuousDistDoubleScalar.Abs<Time,TimeUnit,DurationUnit> parseTimeDist(String s) throws NetworkException
Parse an absolute time distribution, e.g.UNIFORM(1, 3) s
.- Parameters:
s
- String; the string to be parsed.- Returns:
- a typed continuous random distribution.
- Throws:
NetworkException
- in case of a parse error.
-
parseSpeedDist
public static ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit> parseSpeedDist(String s) throws NetworkException
Parse a relative speed distribution, e.g.TRIANGULAR(80, 90, 110) km/h
.- Parameters:
s
- String; the string to be parsed.- Returns:
- a typed continuous random distribution.
- Throws:
NetworkException
- in case of a parse error.
-
-