E nvironment for Deve L oping K DD-Applications Supported by I ndex-Structures

## de.lmu.ifi.dbs.elki.data.synthetic.bymodel.distribution Class NormalDistribution

```java.lang.Object
de.lmu.ifi.dbs.elki.data.synthetic.bymodel.distribution.NormalDistribution
```
All Implemented Interfaces:
Distribution

`public final class NormalDistributionextends Objectimplements Distribution`

Simple generator for a Gaussian = Normal Distribution

Author:
Erich Schubert

Field Summary
`private  double` `mean`
Mean value for the generator
`private  Random` `random`
The random generator.
`private  double` `stddev`
Standard deviation

Constructor Summary
```NormalDistribution(double mean, double stddev, Random random)```
Constructor for Gaussian generator

Method Summary
` double` `explain(double val)`
Return the PDF of the generators distribution
` double` `generate()`
Generate a random value with the generators parameters
`private static double` `phi(double x)`
Standardized Gaussian PDF
`static double` ```phi(double x, double mu, double sigma)```
Gaussian distribution PDF
` String` `toString()`
Simple toString explaining the distribution parameters.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### mean

`private double mean`
Mean value for the generator

### stddev

`private double stddev`
Standard deviation

### random

`private Random random`
The random generator.

Constructor Detail

### NormalDistribution

```public NormalDistribution(double mean,
double stddev,
Random random)```
Constructor for Gaussian generator

Parameters:
`mean` - Mean
`stddev` - Standard Deviation
`random` - Random generator
Method Detail

### phi

`private static double phi(double x)`
Standardized Gaussian PDF

Parameters:
`x` - query value
Returns:
probability density

### phi

```public static double phi(double x,
double mu,
double sigma)```
Gaussian distribution PDF

Parameters:
`x` - query value
`mu` - mean
`sigma` - standard distribution
Returns:
probability density

### explain

`public double explain(double val)`
Return the PDF of the generators distribution

Specified by:
`explain` in interface `Distribution`
Parameters:
`val` - existing value
Returns:
distribution density

### generate

`public double generate()`
Generate a random value with the generators parameters

Specified by:
`generate` in interface `Distribution`
Returns:
new generated value

### toString

`public String toString()`
Simple toString explaining the distribution parameters. Used in producing a model description.

Specified by:
`toString` in interface `Distribution`
Overrides:
`toString` in class `Object`
Returns:
description

 Release 0.2 (2009-07-06_1820)