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].
-
Uniform(double, double)
-
-
Uniform(long, double, double)
-
-
Uniform(RandomEngine, double, double)
-
-
density(double)
- Return the value of the density in the given point
-
draw()
- Draws a value with a uniform probability in real segment [a,b]
-
setParam(double, double)
- Resets generator parameters (reordered if a > b)
-
type()
- Abstract method that allows to identify the type of the value.
Uniform
public Uniform(double a,
double b)
- Parameters:
- a - segment lower bound
- b - segment upper bound
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
Uniform
public Uniform(RandomEngine e,
double a,
double b)
- Parameters:
- e - Random Generator Engine instance
- a - segment lower bound
- b - segment upper bound
density
public double density(double x)
- Return the value of the density in the given point
- Parameters:
- x - point to sample for density
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
setParam
public void setParam(double a,
double b)
- Resets generator parameters (reordered if a > b)
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