A library of runtime-selectable doubly-truncated probability distribution models. Returns random samples based on given distribution parameters. More...
Public Member Functions | |
TypeName ("distributionModel") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, distributionModel, dictionary,(const dictionary &dict, Random &rndGen),(dict, rndGen)) | |
Declare runtime constructor selection table. More... | |
distributionModel (const word &name, const dictionary &dict, Random &rndGen) | |
Construct from dictionary. More... | |
distributionModel (const distributionModel &p) | |
Copy construct. More... | |
virtual autoPtr< distributionModel > | clone () const =0 |
Construct and return a clone. More... | |
virtual | ~distributionModel ()=default |
Destructor. More... | |
virtual scalar | sample () const =0 |
Sample the distribution. More... | |
virtual scalar | minValue () const |
Return the minimum of the distribution. More... | |
virtual scalar | maxValue () const |
Return the maximum of the distribution. More... | |
virtual scalar | meanValue () const =0 |
Return the theoretical mean of the distribution, or the arithmetic mean of the distribution data. More... | |
Static Public Member Functions | |
static autoPtr< distributionModel > | New (const dictionary &dict, Random &rndGen) |
Selector. More... | |
Protected Member Functions | |
virtual void | check () const |
Check that the distribution model is valid. More... | |
Protected Attributes | |
const dictionary | distributionModelDict_ |
Coefficients dictionary. More... | |
Random & | rndGen_ |
Reference to the random number generator. More... | |
scalar | minValue_ |
Minimum of the distribution. More... | |
scalar | maxValue_ |
Maximum of the distribution. More... | |
A library of runtime-selectable doubly-truncated probability distribution models. Returns random samples based on given distribution parameters.
Available distribution models include:
Definition at line 69 of file distributionModel.H.
distributionModel | ( | const word & | name, |
const dictionary & | dict, | ||
Random & | rndGen | ||
) |
Construct from dictionary.
Definition at line 71 of file distributionModel.C.
distributionModel | ( | const distributionModel & | p | ) |
Copy construct.
Definition at line 85 of file distributionModel.C.
|
virtualdefault |
Destructor.
|
protectedvirtual |
Check that the distribution model is valid.
Definition at line 35 of file distributionModel.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, distributionModel::maxValue(), distributionModel::minValue(), Foam::nl, Foam::type(), and WarningInFunction.
TypeName | ( | "distributionModel" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
distributionModel | , | ||
dictionary | , | ||
(const dictionary &dict, Random &rndGen) | , | ||
(dict, rndGen) | |||
) |
Declare runtime constructor selection table.
|
pure virtual |
Construct and return a clone.
Implemented in multiNormal, massRosinRammler, normal, RosinRammler, general, exponential, binned, uniform, and fixedValue.
|
static |
Selector.
Definition at line 27 of file distributionModelNew.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, Foam::Info, and rndGen.
|
pure virtual |
Sample the distribution.
Implemented in multiNormal, massRosinRammler, normal, RosinRammler, general, exponential, binned, uniform, and fixedValue.
|
virtual |
Return the minimum of the distribution.
Reimplemented in fixedValue.
Definition at line 98 of file distributionModel.C.
Referenced by distributionModel::check().
|
virtual |
Return the maximum of the distribution.
Reimplemented in fixedValue.
Definition at line 104 of file distributionModel.C.
Referenced by distributionModel::check().
|
pure virtual |
Return the theoretical mean of the distribution, or the arithmetic mean of the distribution data.
Implemented in multiNormal, massRosinRammler, normal, RosinRammler, general, exponential, binned, uniform, and fixedValue.
|
protected |
Coefficients dictionary.
Definition at line 78 of file distributionModel.H.
|
protected |
Reference to the random number generator.
Definition at line 83 of file distributionModel.H.
Referenced by massRosinRammler::sample().
|
protected |
Minimum of the distribution.
Definition at line 88 of file distributionModel.H.
Referenced by massRosinRammler::sample().
|
protected |
Maximum of the distribution.
Definition at line 93 of file distributionModel.H.
Referenced by massRosinRammler::sample().