cz.zcu.kiv.vsp.msloup.generator
Class GaussianGenerator

java.lang.Object
  extended by cz.zcu.kiv.vsp.msloup.generator.GaussianGenerator
All Implemented Interfaces:
IGenerator

public class GaussianGenerator
extends Object
implements IGenerator

Generator normaloveho (Gauss) rozdeleni s parametrem mu a sigma. Vypocet hodnot je proveden pomoci centralni limitni vety.

Priklad pouziti:

 IGenerator gen = new GaussianGenerator(0, 1);
 System.out.println(gen.nextValue()); // vypise vygenerovanou hodnotu

Author:
Martin Sloup

Constructor Summary
GaussianGenerator(double mi, double sigma)
          Konstruktor generatoru normaloveho (Gauss) rozdeleni se stredni hodnotou mu a rozptylem sigma
 
Method Summary
 double nextValue()
          Vygeneruje dalsi hodnotu normaloveho (Gauss) rozdeleni a vrati ji.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GaussianGenerator

public GaussianGenerator(double mi,
                         double sigma)
Konstruktor generatoru normaloveho (Gauss) rozdeleni se stredni hodnotou mu a rozptylem sigma

Parameters:
mi - stredni hodnota
sigma - rozptyl
Method Detail

nextValue

public double nextValue()
Vygeneruje dalsi hodnotu normaloveho (Gauss) rozdeleni a vrati ji.

Specified by:
nextValue in interface IGenerator
Returns:
vygenerovanou hodnotu