tango.math.random.ExpSource

License:

BSD style: see license.txt

Version:

Initial release: July 2008

Author:

Fawzi Mohamed
class ExpSource(RandG, T) #
class that returns exponential distributed numbers (f=exp(-x) for x>0, 0 otherwise)
real probDensityF(real x) [static] #
probability distribution
real invProbDensityF(real x) [static] #
inverse probability distribution
real cumProbDensityFCompl(real x) [static] #
complement of the cumulative density distribution (integral x..infinity probDensityF)
T tailGenerator(RandG r, T dMin) [static] #
tail for exponential distribution
SourceT source #
internal source of exp distribued numbers
this(RandG r) #
initializes the probability distribution
ExpSource opCall(U, S...)(ref U a, S args) #
chainable call style initialization of variables (thorugh a call to randomize)
T getRandom() #
returns a exp distribued number
T getRandom(T beta) #
returns a exp distribued number with the given beta (survival rate, average) f=1/beta*exp(-x/beta)
U randomize(U)(ref U x) #
initializes the given variable with an exponentially distribued number
U randomize(U, V)(ref U x, V beta) #
initializes the given variable with an exponentially distribued number with scale parameter beta
U randomizeOp(U, S)(S delegate(T) op, ref U a) #
initializes the given variable with an exponentially distribued number and maps op on it
struct ExpDistribution #
exp distribution with different default scale parameter beta f=1/beta*exp(-x/beta) for x>0, 0 otherwise
ExpDistribution create()(ExpSource source, T beta) [static] #
constructor
ExpDistribution opCall(U, S...)(ref U a, S args) #
chainable call style initialization of variables (thorugh a call to randomize)
T getRandom() #
returns a single number
U randomize(U)(ref U a) #
initialize a
U randomize(U, V)(ref U a, V b) #
initialize a
ExpDistribution expD(T beta) #
returns an exp distribution with a different beta