A library of runtime-selectable doubly-truncated probability distribution models. Returns random samples based on given distribution parameters. More...
#include <distributionModel.H>


Public Member Functions | |
| TypeName ("distributionModel") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, distributionModel, dictionary,(const dictionary &dict, Random &rndGen),(dict, rndGen)) | |
| Declare runtime constructor selection table. | |
| distributionModel (const word &name, const dictionary &dict, Random &rndGen) | |
| Construct from dictionary. | |
| distributionModel (const distributionModel &p) | |
| Copy construct. | |
| virtual autoPtr< distributionModel > | clone () const =0 |
| Construct and return a clone. | |
| virtual | ~distributionModel ()=default |
| Destructor. | |
| virtual scalar | sample () const =0 |
| Sample the distribution. | |
| virtual scalar | minValue () const |
| Return the minimum of the distribution. | |
| virtual scalar | maxValue () const |
| Return the maximum of the distribution. | |
| virtual scalar | meanValue () const =0 |
| Return the theoretical mean of the distribution, or the arithmetic mean of the distribution data. | |
Static Public Member Functions | |
| static autoPtr< distributionModel > | New (const dictionary &dict, Random &rndGen) |
| Selector. | |
Protected Member Functions | |
| virtual void | check () const |
| Check that the distribution model is valid. | |
Protected Attributes | |
| const dictionary | distributionModelDict_ |
| Coefficients dictionary. | |
| Random & | rndGen_ |
| Reference to the random number generator. | |
| scalar | minValue_ |
| Minimum of the distribution. | |
| scalar | maxValue_ |
| Maximum of the distribution. | |
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 70 of file distributionModel.C.
References dict, distributionModelDict_, maxValue_, minValue_, Foam::name(), rndGen, and rndGen_.
Referenced by binned::binned(), binned::binned(), binned::binned(), declareRunTimeSelectionTable(), distributionModel(), exponential::exponential(), exponential::exponential(), fixedValue::fixedValue(), fixedValue::fixedValue(), general::general(), general::general(), general::general(), massRosinRammler::massRosinRammler(), massRosinRammler::massRosinRammler(), multiNormal::multiNormal(), multiNormal::multiNormal(), normal::normal(), normal::normal(), RosinRammler::RosinRammler(), RosinRammler::RosinRammler(), uniform::uniform(), and uniform::uniform().


| distributionModel | ( | const distributionModel & | p | ) |
Copy construct.
Definition at line 84 of file distributionModel.C.
References distributionModel(), distributionModelDict_, maxValue_, minValue_, p, and rndGen_.

|
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, maxValue(), minValue(), Foam::nl, Foam::type(), and WarningInFunction.
Referenced by binned::binned(), exponential::exponential(), general::general(), and uniform::uniform().


| TypeName | ( | "distributionModel" | ) |
Runtime type information.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| distributionModel | , | ||
| dictionary | , | ||
| (const dictionary &dict, Random &rndGen) | , | ||
| (dict, rndGen) | ) |
Declare runtime constructor selection table.
References dict, distributionModel(), Foam::name(), p, and rndGen.

|
pure virtual |
Construct and return a clone.
Implemented in binned, exponential, fixedValue, general, massRosinRammler, multiNormal, normal, RosinRammler, and uniform.
|
static |
Selector.
Definition at line 26 of file distributionModelNew.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, Foam::Info, and rndGen.

|
pure virtual |
Sample the distribution.
Implemented in binned, exponential, fixedValue, general, massRosinRammler, multiNormal, normal, RosinRammler, and uniform.
|
virtual |
Return the minimum of the distribution.
Reimplemented in fixedValue.
Definition at line 98 of file distributionModel.C.
References minValue_.
Referenced by check().

|
virtual |
Return the maximum of the distribution.
Reimplemented in fixedValue.
Definition at line 104 of file distributionModel.C.
References maxValue_.
Referenced by check().

|
pure virtual |
Return the theoretical mean of the distribution, or the arithmetic mean of the distribution data.
Implemented in binned, exponential, fixedValue, general, massRosinRammler, multiNormal, normal, RosinRammler, and uniform.
|
protected |
Coefficients dictionary.
Definition at line 78 of file distributionModel.H.
Referenced by binned::binned(), distributionModel(), distributionModel(), exponential::exponential(), fixedValue::fixedValue(), general::general(), massRosinRammler::massRosinRammler(), multiNormal::multiNormal(), normal::normal(), and RosinRammler::RosinRammler().
|
protected |
Reference to the random number generator.
Definition at line 83 of file distributionModel.H.
Referenced by distributionModel(), distributionModel(), binned::sample(), exponential::sample(), general::sample(), massRosinRammler::sample(), multiNormal::sample(), multiNormal::sample(), normal::sample(), RosinRammler::sample(), and uniform::sample().
|
protected |
Minimum of the distribution.
Definition at line 88 of file distributionModel.H.
Referenced by binned::binned(), binned::binned(), distributionModel(), distributionModel(), general::general(), general::general(), normal::meanValue(), RosinRammler::meanValue(), uniform::meanValue(), minValue(), exponential::sample(), massRosinRammler::sample(), multiNormal::sample(), normal::sample(), RosinRammler::sample(), and uniform::sample().
|
protected |
Maximum of the distribution.
Definition at line 93 of file distributionModel.H.
Referenced by binned::binned(), binned::binned(), distributionModel(), distributionModel(), general::general(), general::general(), maxValue(), normal::meanValue(), RosinRammler::meanValue(), uniform::meanValue(), binned::sample(), exponential::sample(), massRosinRammler::sample(), multiNormal::sample(), normal::sample(), RosinRammler::sample(), and uniform::sample().