All Packages Class Hierarchy This Package Previous Next Index
Class simula.random.Normal
java.lang.Object
|
+----simula.random.Generator
|
+----simula.random.Normal
- public class Normal
- extends Generator
The class Normal allows to generate real values with a normal distribution.
-
Normal(double, double)
- Creates a new Normal generator using the standard engine and the current time as seed.
-
Normal(long, double, double)
- Creates a new Normal generator using the standard engine with the given seed.
-
Normal(RandomEngine, double, double)
- Creates a new Normal generator using the given engine.
-
density(double)
- Returns the value of the density in the given point.
-
draw()
- Draws a value from the generator.
-
setParam(double, double)
- Change the parameters of the gaussian distribution.
-
type()
- Returns the type of the extracted value.
Normal
public Normal(double m,
double s)
- Creates a new Normal generator using the standard engine and the current time as seed.
- Parameters:
- m - Average.
- s - Square root of the standard deviation.
Normal
public Normal(long seed,
double m,
double s)
- Creates a new Normal generator using the standard engine with the given seed.
- Parameters:
- seed - Initial seed for the pseudo-random engine.
- m - Average.
- s - Square root of the standard deviation.
Normal
public Normal(RandomEngine e,
double m,
double s)
- Creates a new Normal generator using the given engine.
- Parameters:
- e - Pseudo-random bit generator.
- m - Average.
- s - Square root of the standard deviation.
- See Also:
- RandomEngine
density
public double density(double x)
- Returns the value of the density in the given point.
- Parameters:
- x - Point to value the density of.
- Returns:
- the value of the density in the given point.
draw
public Value draw()
- Draws a value from the generator.
- Returns:
- An instance of Value that encapsulates a real value.
- Overrides:
- draw in class Generator
- See Also:
- RealValue, Value
setParam
public void setParam(double m,
double s)
- Change the parameters of the gaussian distribution.
- Parameters:
- m - Average.
- s - Square root of the standard deviation.
type
public int type()
- Returns the type of the extracted value.
- Overrides:
- type in class Generator
All Packages Class Hierarchy This Package Previous Next Index