|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.tudelft.simulation.jstats.distributions.Dist
nl.tudelft.simulation.jstats.distributions.DistDiscrete
nl.tudelft.simulation.jstats.distributions.DistDiscreteEmpirical
public class DistDiscreteEmpirical
The discrete empirical distribution as defined on page 326 of Law&Kelton.
(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.
| Field Summary |
|---|
| Fields inherited from class nl.tudelft.simulation.jstats.distributions.Dist |
|---|
stream |
| Constructor Summary | |
|---|---|
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. |
|
| 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 |
| Constructor Detail |
|---|
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 cummulative| Method Detail |
|---|
public long draw()
DistDiscrete
draw in class DistDiscreteDistDiscrete.draw()public double probability(int observation)
DistDiscrete
probability in class DistDiscreteobservation - the discrete observation.
DistDiscrete.probability(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||