eNTitanok.util
Class Veletlen.Veges

java.lang.Object
  |
  +--eNTitanok.util.Veletlen
        |
        +--eNTitanok.util.Veletlen.Veges
Enclosing class:
Veletlen

public static class Veletlen.Veges
extends Veletlen
implements Veletlen.Generalo

A megadott diszkrét, véges eloszlású, nemnegatív értékű számokat generál.


Inner classes inherited from class eNTitanok.util.Veletlen
Veletlen.CsakDetException, Veletlen.DetHatarException, Veletlen.Egyenletes, Veletlen.Exponencialis, Veletlen.Generalo, Veletlen.Normalis, Veletlen.Poisson, Veletlen.Veges
 
Field Summary
protected  int[] eloszlas
          Az eloszlás.
protected  int osszeg
          `eloszlas' elemeinek összege.
 
Fields inherited from class eNTitanok.util.Veletlen
csakDet, kovetkezo, random
 
Constructor Summary
Veletlen.Veges(int[] eloszlas)
           
Veletlen.Veges(java.util.Random random, boolean csakDet, int[] eloszlas)
           
 
Method Summary
 int general()
          Generálja a következő véletlenszámot.
 
Methods inherited from class eNTitanok.util.Veletlen
csakDetet, egyenletes, egyenletes, exponencialis, exponencialis, getRandom, getUtolso, normalis, normalis, normalis, poisson, poisson, sorba, sorbaDelta
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

osszeg

protected int osszeg
`eloszlas' elemeinek összege. Bele kell, hogy férjen az int-be.

eloszlas

protected int[] eloszlas
Az eloszlás. Nemnegatív gyakoriságértékek, melyek összege pozitív. Az `i' kimenetel valószínűsége: eloszlas[i]/osszeg.
Constructor Detail

Veletlen.Veges

public Veletlen.Veges(java.util.Random random,
                      boolean csakDet,
                      int[] eloszlas)
See Also:
Veletlen.Veletlen()

Veletlen.Veges

public Veletlen.Veges(int[] eloszlas)
Method Detail

general

public int general()
Generálja a következő véletlenszámot.
Specified by:
general in interface Veletlen.Generalo