All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class simula.random.Uniform

java.lang.Object
   |
   +----simula.random.Generator
           |
           +----simula.random.Uniform

public class Uniform
extends Generator
The class Uniform inherits from Generator and is useful to draw numbers with uniform probability in the real segment [a,b].


Constructor Index

 o Uniform(double, double)
 o Uniform(long, double, double)
 o Uniform(RandomEngine, double, double)

Method Index

 o density(double)
Return the value of the density in the given point
 o draw()
Draws a value with a uniform probability in real segment [a,b]
 o setParam(double, double)
Resets generator parameters (reordered if a > b)
 o type()
Abstract method that allows to identify the type of the value.

Constructors

 o Uniform
 public Uniform(double a,
                double b)
Parameters:
a - segment lower bound
b - segment upper bound
 o Uniform
 public Uniform(long seed,
                double a,
                double b)
Parameters:
seed - seed for the Java Random generator
a - segment lower bound
b - segment upper bound
 o Uniform
 public Uniform(RandomEngine e,
                double a,
                double b)
Parameters:
e - Random Generator Engine instance
a - segment lower bound
b - segment upper bound

Methods

 o density
 public double density(double x)
Return the value of the density in the given point

Parameters:
x - point to sample for density
 o draw
 public Value draw()
Draws a value with a uniform probability in real segment [a,b]

Returns:
an instance of Value containing a real point.
Overrides:
draw in class Generator
See Also:
Value
 o setParam
 public void setParam(double a,
                      double b)
Resets generator parameters (reordered if a > b)

 o type
 public int type()
Abstract method that allows to identify the type of the value.

Overrides:
type in class Generator

All Packages  Class Hierarchy  This Package  Previous  Next  Index