27package umontreal.ssj.randvar;
29import umontreal.ssj.functions.MathFunction;
30import umontreal.ssj.rng.RandomStream;
31import umontreal.ssj.probdist.ContinuousDistribution;
32import umontreal.ssj.probdist.InverseDistFromDensity;
282 return dist.inverseF(stream.nextDouble());
Classes implementing continuous distributions should inherit from this base class.
Implements a method for computing the inverse of an arbitrary continuous distribution function when o...
InverseFromDensityGen(RandomStream stream, ContinuousDistribution dis, double xc, double eps, int order)
Creates a new generator for the continuous distribution dis, using stream stream.
int getOrder()
Returns the order of the interpolating polynomial.
double nextDouble()
Generates a new random variate.
InverseFromDensityGen(RandomStream stream, MathFunction dens, double xc, double eps, int order, double xleft, double xright)
Creates a new generator from the continuous probability density dens.
double getEpsilon()
Returns the -resolution eps.
double getXc()
Returns the xc given in the constructor.
This interface should be implemented by classes which represent univariate mathematical functions.
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...