nl.tudelft.simulation.jstats.distributions
Class DistCustom
java.lang.Object
nl.tudelft.simulation.jstats.distributions.Dist
nl.tudelft.simulation.jstats.distributions.DistDiscrete
nl.tudelft.simulation.jstats.distributions.DistCustom
- All Implemented Interfaces:
- java.io.Serializable
- public class DistCustom
- extends DistDiscrete
The custom distribution. This distribution is based on its entry map
consisting of value, probability pairs.
(c) copyright 2002-2004 Delft
University of Technology , the Netherlands.
See for project information
www.simulation.tudelft.nl
License of use: General Public
License (GPL) , no warranty
- Since:
- 1.2
- Version:
- 1.4 2004-03-22
- Author:
-
Alexander Verbraeck
Peter
Jacobs
- See Also:
- Serialized Form
|
Nested Class Summary |
static class |
DistCustom.Entry
A Entry for the custom distribution |
| Fields inherited from class nl.tudelft.simulation.jstats.distributions.Dist |
stream |
|
Method Summary |
long |
draw()
draws the next long from the stream. |
double |
probability(int observation)
returns the propbability of the observation in this particular
distribution. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DistCustom
public DistCustom(StreamInterface stream,
DistCustom.Entry[] values)
- constructs a new DistCustom
- Parameters:
stream - the stream to usevalues - the values for this custom distribution
draw
public long draw()
- Description copied from class:
DistDiscrete
- draws the next long from the stream.
- Specified by:
draw in class DistDiscrete
- Returns:
- long
- See Also:
DistDiscrete.draw()
probability
public double probability(int observation)
- Description copied from class:
DistDiscrete
- returns the propbability of the observation in this particular
distribution.
- Specified by:
probability in class DistDiscrete
- Parameters:
observation - the discrete observation.
- Returns:
- double the probability.
- See Also:
DistDiscrete.probability(int)
Copyright © 2002-2004 Delft University of Technology, the Netherlands. All Rights Reserved.