Class AbstractDiscreteDistScalar
- java.lang.Object
-
- org.opentrafficsim.core.units.distributions.AbstractDiscreteDistScalar
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DiscreteDistDoubleScalar.Abs,DiscreteDistDoubleScalar.Rel,DiscreteDistFloatScalar.Abs,DiscreteDistFloatScalar.Rel
public abstract class AbstractDiscreteDistScalar extends Object implements Serializable
Discrete distribution with unit.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
$LastChangedDate: 2015-07-26 01:01:13 +0200 (Sun, 26 Jul 2015) $, @version $Revision: 1155 $, by $Author: averbraeck $, initial version Feb 2, 2015
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDiscreteDistScalar(long constant, Unit<?> unit)Construct a new AbstractDiscreteDistScalar that always draws the same, fixed, value.protectedAbstractDiscreteDistScalar(DistDiscrete distribution, Unit<?> unit)Construct a new AbstractDiscreteDistScalar.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DistDiscretegetDistribution()Retrieve the distribution.Unit<?>getUnit()Retrieve the unit.StringtoString()
-
-
-
Constructor Detail
-
AbstractDiscreteDistScalar
protected AbstractDiscreteDistScalar(DistDiscrete distribution, Unit<?> unit)
Construct a new AbstractDiscreteDistScalar.- Parameters:
distribution- DistDiscrete; the wrapped distribution function.unit- Unit<?>; the unit.
-
AbstractDiscreteDistScalar
protected AbstractDiscreteDistScalar(long constant, Unit<?> unit)Construct a new AbstractDiscreteDistScalar that always draws the same, fixed, value.- Parameters:
constant- long; the constant value.unit- Unit<?>; the unit.
-
-
Method Detail
-
getDistribution
public final DistDiscrete getDistribution()
Retrieve the distribution.- Returns:
- DistDiscrete; the distribution.
-
getUnit
public final Unit<?> getUnit()
Retrieve the unit.- Returns:
- Unit<?>; the unit
-
-