package umontreal.iro.lecuyer.randvar;
import umontreal.iro.lecuyer.rng.*;
import umontreal.iro.lecuyer.probdist.*;
/**
* This class implements random variate generators with the symmetrical
* beta distribution with shape parameters
* α = β,
* over the interval (0, 1).
*
*/
public class BetaSymmetricalGen extends BetaGen {
/**
* Creates a new symmetrical beta generator with parameters α =
* alpha, over the interval (0, 1), using stream s.
*
*/
public BetaSymmetricalGen (RandomStream s, double alpha) {
this (s, new BetaSymmetricalDist (alpha));
}
/**
* Creates a new generator for the distribution dist,
* using stream s.
*
*/
public BetaSymmetricalGen (RandomStream s, BetaSymmetricalDist dist) {
super (s, dist);
}
public static double nextDouble (RandomStream s, double alpha) {
return BetaSymmetricalDist.inverseF (alpha, s.nextDouble());
}
}
Ads help maintain this website.