33 namespace distributionModels
49 minValue_(distributionModelDict_.template lookup<scalar>(
"minValue")),
50 maxValue_(distributionModelDict_.template lookup<scalar>(
"maxValue")),
51 lambda_(distributionModelDict_.template lookup<scalar>(
"lambda"))
61 minValue_(p.minValue_),
62 maxValue_(p.maxValue_),
78 scalar
K =
exp(-lambda_*maxValue_) -
exp(-lambda_*minValue_);
79 return -(1.0/lambda_)*
log(
exp(-lambda_*minValue_) + y*
K);
virtual scalar minValue() const
Return the minimum value.
dimensionedScalar log(const dimensionedScalar &ds)
Random & rndGen_
Reference to the random number generator.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual scalar maxValue() const
Return the maximum value.
virtual scalar sample() const
Sample the distributionModel.
CGAL::Exact_predicates_exact_constructions_kernel K
Macros for easy insertion into run-time selection tables.
virtual ~exponential()
Destructor.
exponential distribution model
Type sample01()
Advance the state and return a sample of a given type from a.
dimensionedScalar exp(const dimensionedScalar &ds)
virtual scalar meanValue() const
Return the mean value.
defineTypeNameAndDebug(exponential, 0)
A library of runtime-selectable distribution models.
addToRunTimeSelectionTable(distributionModel, exponential, dictionary)
exponential(const dictionary &dict, Random &rndGen)
Construct from components.