drasys.or.prob
Interface DistributionI

All Known Subinterfaces:
ContinuousDistributionI, DiscreteDistributionI
All Known Implementing Classes:
Distribution

public interface DistributionI

The interface used by algorithms to access all distributions.

See Also:
BinomialDistribution, PoissonDistribution, EmpiricalDistribution, DiscreteUniformDistribution, UniformDistribution, NormalDistribution, ExponentialDistribution, GammaDistribution

Method Summary
 double cdf(double x)
          Returns the value of the cumulative distribution function at x;
 MatrixI getRandomMatrix(int sizeOfRows, int sizeOfColumns)
          Returns a matrix of random numbers from the distribution.
 RandomI getRandomNumberGenerator()
          Gets the random number generator.
 double getRandomScaler()
          Returns a random number from the distribution.
 VectorI getRandomVector(int size)
          Returns a vector of random numbers from the distribution.
 double mean()
          Returns the mean of the distribution.
 double pdf(double x)
          Returns the value of the probability distribution function at x;
 double probability(double x)
          Returns the probability of x.
 double probability(double x1, double x2)
          Returns the probability that x >= x1 and x <= x2.
 MatrixI setElements(MatrixI matrix)
          Set the elements in a matrix to random values from the distribution.
 VectorI setElements(VectorI vector)
          Set the elements in a vector to random values from the distribution.
 void setRandomNumberGenerator(RandomI random)
          Sets the random number generator.
 void setSeed(long seed)
          Sets the seed for the random number generator.
 double std()
          Returns the standard deviation of the distribution.
 double variance()
          Returns the variance of the distribution.
 

Method Detail

setSeed

public void setSeed(long seed)
Sets the seed for the random number generator.

setRandomNumberGenerator

public void setRandomNumberGenerator(RandomI random)
Sets the random number generator.

getRandomNumberGenerator

public RandomI getRandomNumberGenerator()
Gets the random number generator.

getRandomScaler

public double getRandomScaler()
Returns a random number from the distribution.

getRandomVector

public VectorI getRandomVector(int size)
Returns a vector of random numbers from the distribution.

getRandomMatrix

public MatrixI getRandomMatrix(int sizeOfRows,
                               int sizeOfColumns)
Returns a matrix of random numbers from the distribution.

setElements

public VectorI setElements(VectorI vector)
Set the elements in a vector to random values from the distribution. Only the non-null elements in the vector are set.
Returns:
the argument 'vector'

setElements

public MatrixI setElements(MatrixI matrix)
Set the elements in a matrix to random values from the distribution. Only the non-null elements in the matrix are set.
Returns:
the argument 'matrix'

mean

public double mean()
Returns the mean of the distribution.

variance

public double variance()
Returns the variance of the distribution.

std

public double std()
Returns the standard deviation of the distribution.

pdf

public double pdf(double x)
Returns the value of the probability distribution function at x;

cdf

public double cdf(double x)
Returns the value of the cumulative distribution function at x;

probability

public double probability(double x)
Returns the probability of x.

probability

public double probability(double x1,
                          double x2)
Returns the probability that x >= x1 and x <= x2.


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com