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