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