Class DiscreteDistFloatScalar.Rel<T extends AbstractFloatScalarRel<U,T>,U extends Unit<U>>
- java.lang.Object
-
- org.opentrafficsim.core.units.distributions.AbstractDiscreteDistScalar
-
- org.opentrafficsim.core.units.distributions.DiscreteDistFloatScalar.Rel<T,U>
-
- Type Parameters:
T
- The absolute float scalar typeU
- The unit type used
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- DiscreteDistFloatScalar
public static class DiscreteDistFloatScalar.Rel<T extends AbstractFloatScalarRel<U,T>,U extends Unit<U>> extends AbstractDiscreteDistScalar implements Serializable
Relative value.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Rel(int constant, U unit)
Rel(DistDiscrete distribution, U unit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
draw()
String
toString()
-
Methods inherited from class org.opentrafficsim.core.units.distributions.AbstractDiscreteDistScalar
getDistribution, getUnit
-
-
-
-
Constructor Detail
-
Rel
public Rel(DistDiscrete distribution, U unit)
- Parameters:
distribution
- DistDiscrete; the wrapped distribution function.unit
- U; the unit.
-
Rel
public Rel(int constant, U unit)
- Parameters:
constant
- int; the constant value.unit
- U; the unit.
-
-
Method Detail
-
draw
public final T draw()
- Returns:
- a drawn number from the distribution in the given unit.
-
toString
public final String toString()
- Overrides:
toString
in classAbstractDiscreteDistScalar
-
-