public class DistDiscreteEmpirical extends DistDiscrete
(c) copyright 2002-2004 Delft
University of Technology , the Netherlands.
See for project information
www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
Constructor and Description |
---|
DistDiscreteEmpirical(StreamInterface stream,
long[] observations)
constructs a new DistDiscreteEmpirical distribution.
|
DistDiscreteEmpirical(StreamInterface stream,
Long[] observations)
constructs a new DistDiscreteEmpirical distribution.
|
DistDiscreteEmpirical(StreamInterface stream,
ObservationsInterface observations)
constructs a new DistDiscreteEmpirical distribution.
|
DistDiscreteEmpirical(StreamInterface stream,
SortedMap observations,
boolean cummulative)
constructs a new DistDiscreteEmpirical distribution.
|
Modifier and Type | Method and Description |
---|---|
long |
draw()
draws the next long from the stream.
|
double |
probability(int observation)
returns the propbability of the observation in this particular
distribution.
|
public DistDiscreteEmpirical(StreamInterface stream, ObservationsInterface observations)
stream
- the stream to useobservations
- the observations feeding the distributions. These
observations should be in one of two possible formats. The first
accepted format is the X(i);probability format. This results in a
map with values such as 1=0.33;2=0.167;3=0.167;4=0.33. The second
allowed format is the X(i);occurrence combination resulting in
values such as 1=2;2=1;3=1;4=2.public DistDiscreteEmpirical(StreamInterface stream, Long[] observations)
stream
- the stream to useobservations
- the observations feeding the distributions. This
sortedmap should be filled with observation probability values.
The probability may either reflect the number of times this
observation is observed or may contain a relative probability.public DistDiscreteEmpirical(StreamInterface stream, long[] observations)
stream
- the stream to useobservations
- the observations feeding the distributions. This
sortedmap should be filled with observation probability values.
The probability may either reflect the number of times this
observation is observed or may contain a relative probability.public DistDiscreteEmpirical(StreamInterface stream, SortedMap observations, boolean cummulative)
stream
- the stream to useobservations
- the observations feeding the distributions. This
sortedmap should be filled with observation probability values.
The probability may either reflect the number of times this
observation is observed or may contain a relative probability.cummulative
- reflects whether the probabilities are cummulativepublic long draw()
DistDiscrete
draw
in class DistDiscrete
DistDiscrete.draw()
public double probability(int observation)
DistDiscrete
probability
in class DistDiscrete
observation
- the discrete observation.DistDiscrete.probability(int)
Copyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.