Class DiscreteDistSpeed
- java.lang.Object
-
- org.opentrafficsim.core.units.distributions.AbstractDiscreteDistScalar
-
- org.opentrafficsim.core.units.distributions.DiscreteDistDoubleScalar.Rel<Speed,SpeedUnit>
-
- org.opentrafficsim.core.units.distributions.DiscreteDistSpeed
-
- All Implemented Interfaces:
java.io.Serializable
public class DiscreteDistSpeed extends DiscreteDistDoubleScalar.Rel<Speed,SpeedUnit>
Discretely distributed speed.Copyright (c) 2013-2020 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 29 aug. 2018
- Author:
- Wouter Schakel
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DiscreteDistSpeed(DistDiscrete distribution, SpeedUnit unit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Speeddraw()java.lang.StringtoString()-
Methods inherited from class org.opentrafficsim.core.units.distributions.AbstractDiscreteDistScalar
getDistribution, getUnit
-
-
-
-
Constructor Detail
-
DiscreteDistSpeed
public DiscreteDistSpeed(DistDiscrete distribution, SpeedUnit unit)
- Parameters:
distribution- DistDiscrete; distributionunit- SpeedUnit; units
-
-
Method Detail
-
draw
public Speed draw()
- Overrides:
drawin classDiscreteDistDoubleScalar.Rel<Speed,SpeedUnit>- Returns:
- a drawn number from the distribution in the given unit.
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classDiscreteDistDoubleScalar.Rel<Speed,SpeedUnit>
-
-