Distribution in which the cumulative distribution function is given as a table of values. More...


Public Member Functions | |
| TypeName ("tabulatedCumulative") | |
| Runtime type information. More... | |
| tabulatedCumulative (const unitConversion &units, const dictionary &dict, const label sampleQ, randomGenerator &&rndGen) | |
| Construct from a dictionary. More... | |
| tabulatedCumulative (const tabulatedCumulative &d, const label sampleQ) | |
| Construct copy. More... | |
| virtual autoPtr< distribution > | clone (const label sampleQ) const |
| Construct and return a clone. More... | |
| virtual | ~tabulatedCumulative () |
| Destructor. More... | |
| virtual scalar | sample () const |
| Sample the distribution. More... | |
| virtual scalar | min () const |
| Return the minimum value. More... | |
| virtual scalar | max () const |
| Return the maximum value. More... | |
| virtual scalar | mean () const |
| Return the mean value. More... | |
| virtual tmp< scalarField > | integralPDFxPow (const scalarField &x, const label e, const bool consistent=false) const |
| Return the integral of the PDF multiplied by an integer power of x. More... | |
| virtual void | write (Ostream &os, const unitConversion &units) const |
| Write to a stream. More... | |
| virtual tmp< scalarField > | plotX (const label n) const |
| Return coordinates to plot across the range of the distribution. More... | |
| virtual tmp< scalarField > | plotPDF (const scalarField &x) const |
| Return values to plot the probability density function. More... | |
Public Member Functions inherited from FieldDistribution< distribution, tabulatedCumulative > | |
| Type | sample () const |
| Sample the distribution into components of a primitive type. More... | |
| virtual tmp< scalarField > | sample (const label n) const |
| Sample the distribution into a field. More... | |
Public Member Functions inherited from distribution | |
| TypeName ("distribution") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, distribution, dictionary,(const unitConversion &units, const dictionary &dict, const label sampleQ, randomGenerator &&rndGen),(units, dict, sampleQ, std::move(rndGen))) | |
| Declare runtime constructor selection table. More... | |
| distribution (const word &name, const unitConversion &units, const dictionary &dict, const label sampleQ, randomGenerator &&rndGen) | |
| Construct from dictionary. More... | |
| distribution (const label Q, const label sampleQ, randomGenerator &&rndGen) | |
| Construct from components. More... | |
| distribution (const distribution &d, const label sampleQ) | |
| Construct copy. More... | |
| autoPtr< distribution > | clone () const |
| Construct and return a clone. More... | |
| virtual | ~distribution () |
| Destructor. More... | |
| label | sampleQ () const |
| Access the sample size exponent. More... | |
| void | start (const bool repeat) const |
| Start a sequence of samples. Either a new sequence, or a. More... | |
| template<class Type > | |
| Type | sample () const |
| Sample the distribution into components of a primitive type. More... | |
| virtual tmp< scalarField > | CDF (const scalarField &x) const |
| Return the cumulative density function at the given coordinates. More... | |
| virtual void | writeState (Ostream &os) const |
| Write the state to a stream. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from distribution | |
| static autoPtr< distribution > | New (const unitConversion &units, const dictionary &dict, const label sampleQ, randomGenerator &&rndGen, const bool report=true) |
| Select from dictionary and a random generator. More... | |
| static autoPtr< distribution > | New (const unitConversion &units, const dictionary &dict, const label sampleQ, const randomGenerator::seed &s, const bool global=false, const bool report=true) |
| Select from a dictionary and a random generator seed and global flag. More... | |
| static autoPtr< distribution > | New (autoPtr< distribution > &dPtr, const label sampleQ) |
| Re-select with a different sample size exponent. More... | |
Protected Member Functions inherited from FieldDistribution< distribution, tabulatedCumulative > | |
| FOR_ALL_FIELD_TYPES (VIRTUAL_SAMPLE_TYPE) | |
Protected Member Functions inherited from distribution | |
| virtual void | validateBounds (const dictionary &dict) const |
| Validate that the bounds are monotonic. More... | |
| virtual void | validatePositive (const dictionary &dict) const |
| Validate that the lower bound is positive. More... | |
| tmp< scalarField > | clipPDF (const scalarField &x, const tmp< scalarField > &pdf) const |
| Clip the PDF values to zero outside the bounds. More... | |
| label | q () const |
| Return the effective distribution size exponent. More... | |
| FOR_ALL_FIELD_TYPES (VIRTUAL_SAMPLE_TYPE) | |
Protected Attributes inherited from distribution | |
| const label | Q_ |
| Distribution size exponent. More... | |
| const label | sampleQ_ |
| Sample size exponent. More... | |
| restartableRandomGenerator | rndGen_ |
| Random number generator. More... | |
Distribution in which the cumulative distribution function is given as a table of values.
{
type tabulatedCumulative;
Q 0;
distribution
(
(10e-6 0)
(12e-6 0.1972235)
(15e-6 2.6711166)
(19e-6 11.643361)
(25e-6 28.968245)
(31e-6 52.155796)
(39e-6 74.381959)
(50e-6 91.162850)
(63e-6 100)
);
}
Definition at line 76 of file tabulatedCumulative.H.
| tabulatedCumulative | ( | const unitConversion & | units, |
| const dictionary & | dict, | ||
| const label | sampleQ, | ||
| randomGenerator && | rndGen | ||
| ) |
Construct from a dictionary.
Definition at line 45 of file tabulatedCumulative.C.
References Foam::unitAny.
Referenced by tabulatedCumulative::clone().

| tabulatedCumulative | ( | const tabulatedCumulative & | d, |
| const label | sampleQ | ||
| ) |
Construct copy.
Definition at line 128 of file tabulatedCumulative.C.
References forAll, Foam::integerPow(), UList< T >::last(), distribution::q(), and List< T >::size().

|
virtual |
Destructor.
Definition at line 164 of file tabulatedCumulative.C.
| TypeName | ( | "tabulatedCumulative" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Implements distribution.
Definition at line 118 of file tabulatedCumulative.H.
References distribution::sampleQ(), and tabulatedCumulative::tabulatedCumulative().

|
virtual |
Sample the distribution.
Implements distribution.
Definition at line 170 of file tabulatedCumulative.C.
References unintegrable::sample().

|
virtual |
Return the minimum value.
Implements distribution.
Definition at line 176 of file tabulatedCumulative.C.
|
virtual |
Return the maximum value.
Implements distribution.
Definition at line 182 of file tabulatedCumulative.C.
|
virtual |
Return the mean value.
Implements distribution.
Definition at line 188 of file tabulatedCumulative.C.
References unintegrable::integrate(), and x.

|
virtual |
Return the integral of the PDF multiplied by an integer power of x.
Implements distribution.
Definition at line 196 of file tabulatedCumulative.C.
References Foam::e, Foam::integerPow(), Foam::log(), tmp< T >::ref(), List< T >::size(), and x.

|
virtual |
Write to a stream.
Reimplemented from distribution.
Definition at line 256 of file tabulatedCumulative.C.
References UList< T >::first(), forAll, Foam::integerPow(), UList< T >::last(), Foam::unitAny, Foam::units(), and Foam::vtkWriteOps::write().

|
virtual |
Return coordinates to plot across the range of the distribution.
Reimplemented from distribution.
Definition at line 290 of file tabulatedCumulative.C.
References forAll, Foam::max(), Foam::min(), and tmp< T >::ref().

|
virtual |
Return values to plot the probability density function.
Implements distribution.
Definition at line 311 of file tabulatedCumulative.C.
References forAll, and tmp< T >::ref().
