57#ifndef distributionModel_H
58#define distributionModel_H
95 virtual void check()
const;
150 virtual scalar
sample()
const = 0;
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A library of runtime-selectable doubly-truncated probability distribution models. Returns random samp...
declareRunTimeSelectionTable(autoPtr, distributionModel, dictionary,(const dictionary &dict, Random &rndGen),(dict, rndGen))
Declare runtime constructor selection table.
const dictionary distributionModelDict_
Coefficients dictionary.
virtual void check() const
Check that the distribution model is valid.
virtual ~distributionModel()=default
Destructor.
Random & rndGen_
Reference to the random number generator.
virtual scalar maxValue() const
Return the maximum of the distribution.
virtual scalar sample() const =0
Sample the distribution.
static autoPtr< distributionModel > New(const dictionary &dict, Random &rndGen)
Selector.
TypeName("distributionModel")
Runtime type information.
scalar minValue_
Minimum of the distribution.
scalar maxValue_
Maximum of the distribution.
virtual autoPtr< distributionModel > clone() const =0
Construct and return a clone.
virtual scalar meanValue() const =0
virtual scalar minValue() const
Return the minimum of the distribution.
A class for handling words, derived from Foam::string.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.