nl.tudelft.simulation.jstats.distributions
Class DistEmpirical

java.lang.Object
  extended by nl.tudelft.simulation.jstats.distributions.Dist
      extended by nl.tudelft.simulation.jstats.distributions.DistContinuous
          extended by nl.tudelft.simulation.jstats.distributions.DistEmpirical
All Implemented Interfaces:
Serializable

public class DistEmpirical
extends DistContinuous

The histogram specifies a histogram chart for the DSOL framework.

(c) copyright 2004 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl/dsol
License of use: General Public License (GPL) , no warranty

Since:
1.2
Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:25:42 $
Author:
Peter Jacobs
See Also:
Serialized Form

Field Summary
 
Fields inherited from class nl.tudelft.simulation.jstats.distributions.Dist
stream
 
Constructor Summary
DistEmpirical(StreamInterface stream, Double[] observations)
          constructs a new DistEmpirical
DistEmpirical(StreamInterface stream, List observations)
          constructs a new DistEmpirical
DistEmpirical(StreamInterface stream, ObservationsInterface observations)
          constructs a new DistEmpirical
DistEmpirical(StreamInterface stream, SortedMap observations, boolean cummulative)
          constructs a new DistEmpirical
 
Method Summary
 double draw()
          draws the next stream value according to the probability of this this distribution.
 double probDensity(double observation)
          returns the propbability density value of an observation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistEmpirical

public DistEmpirical(StreamInterface stream,
                     ObservationsInterface observations)
constructs a new DistEmpirical

Parameters:
stream - the stream to use
observations - the observations underlying this empirical distribution. The observations do not need to be sorted. Double observations are allowed and are used.

DistEmpirical

public DistEmpirical(StreamInterface stream,
                     Double[] observations)
constructs a new DistEmpirical

Parameters:
stream - the stream to use
observations - the observations underlying this empirical distribution. The observations do not need to be sorted. Double observations are allowed and are used.

DistEmpirical

public DistEmpirical(StreamInterface stream,
                     List observations)
constructs a new DistEmpirical

Parameters:
stream - the stream to use
observations - the observations underlying this empirical distribution. The observations do not need to be sorted. Double observations are allowed and are used.

DistEmpirical

public DistEmpirical(StreamInterface stream,
                     SortedMap observations,
                     boolean cummulative)
constructs a new DistEmpirical

Parameters:
stream - the stream to use
observations - the observations underlying this empirical distribution. The observations do not need to be sorted. Double observations are allowed and are used.
cummulative - are the probabilities cummulative?
Method Detail

draw

public double draw()
Description copied from class: DistContinuous
draws the next stream value according to the probability of this this distribution.

Specified by:
draw in class DistContinuous
Returns:
the next double value drawn.
See Also:
DistContinuous.draw()

probDensity

public double probDensity(double observation)
Description copied from class: DistContinuous
returns the propbability density value of an observation

Specified by:
probDensity in class DistContinuous
Parameters:
observation - the observation.
Returns:
double the probability density.
See Also:
DistContinuous.probDensity(double)


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.