Class Uniform

All Implemented Interfaces:
Distribution, StorableDistribution

public class Uniform extends AbstractDistribution implements Distribution
This is the Uniform distribution.This object offers many methods to obtain random value distributed like a uniform. This is because the Uniform distribution must be also used by external classes as an interface with the real pseudo-random number generator (which return many type of value distributed like a uniform too). (see the constructor description for its pdf definition).

Copyright (c) 2003
Politecnico di Milano - dipartimento di Elettronica e Informazione
Author:
Fabrizio Frontera - ffrontera@yahoo.it, Modified by Stefano Omini, 7/5/2004
  • Field Summary

    Fields inherited from class AbstractDistribution

    engine
  • Constructor Summary

    Constructors
    Constructor
    Description
    This is the constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    cdf(double x, Parameter p)
    This method is used to obtain from the distribution its cumulative distribution function evaluated where required by the user.
    boolean
    This method is used to obtain from the distribution the next boolean distributed according to the distribution parameter.
    int
    This method is used to obtain from the distribution the next integer number distributed according to the distribution parameter.
    double
    This method is used to obtain from the distribution the next Long integer number distributed according to the distribution parameter.
    double
    This method is used to obtain from the distribution the next number distributed according to the distribution parameter.
    double
    pdf(double x, Parameter p)
    This method is used to obtain from the distribution its probability distribution function evaluated where required by the user.
    double
    This method is used to obtain from the distribution the value of its own theoretic mean.
    double
    This method is used to obtain from the distribution the value of its own theoretic variance.

    Methods inherited from class AbstractDistribution

    setRandomEngine

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface Distribution

    setRandomEngine
  • Constructor Details

    • Uniform

      public Uniform()
      This is the constructor. It creates a new uniform distribution which is defined from pdf:
                    1
      pdf(x) = -----------
                 max-min
      where max and min are two double boundaries for the distribution. max must be greater than min. If x is not between min and max, pdf(x)=0.
  • Method Details