33 namespace distributionModels
49 minValue_(
readScalar(distributionModelDict_.lookup(
"minValue"))),
50 maxValue_(
readScalar(distributionModelDict_.lookup(
"maxValue"))),
51 lambda_(
readScalar(distributionModelDict_.lookup(
"lambda")))
60 minValue_(p.minValue_),
61 maxValue_(p.maxValue_),
77 scalar
K =
exp(-lambda_*maxValue_) -
exp(-lambda_*minValue_);
78 return -(1.0/lambda_)*
log(
exp(-lambda_*minValue_) + y*
K);
dimensionedScalar log(const dimensionedScalar &ds)
virtual scalar sample() const
Sample the distributionModel.
A list of keyword definitions, which are a keyword followed by any number of values (e...
defineTypeNameAndDebug(distributionModel, 0)
CGAL::Exact_predicates_exact_constructions_kernel K
Macros for easy insertion into run-time selection tables.
virtual scalar minValue() const
Return the minimum value.
virtual ~exponential()
Destructor.
Type sample01()
Return a sample whose components lie in the range 0-1.
dimensionedScalar exp(const dimensionedScalar &ds)
exponential(const dictionary &dict, cachedRandom &rndGen)
Construct from components.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
virtual scalar maxValue() const
Return the maximum value.
cachedRandom & rndGen_
Reference to the random number generator.
addToRunTimeSelectionTable(distributionModel, exponential, dictionary)
virtual scalar meanValue() const
Return the mean value.