binned Class Reference

A binned distribution model where the random sample is taken from a discrete set of bins. More...

Inheritance diagram for binned:
[legend]
Collaboration diagram for binned:
[legend]

Public Member Functions

 TypeName ("binned")
 Runtime type information. More...
 
 binned (const dictionary &dict, Random &rndGen)
 Construct from dictionary. More...
 
 binned (const UList< scalar > &sampleData, const scalar binWidth, Random &rndGen)
 Construct from components. More...
 
 binned (const binned &p)
 Construct copy. More...
 
virtual autoPtr< distributionModelclone () const
 Construct and return a clone. More...
 
virtual ~binned ()
 Destructor. More...
 
virtual scalar sample () const
 Sample the distributionModel. More...
 
virtual scalar minValue () const
 Return the minimum value. More...
 
virtual scalar maxValue () const
 Return the maximum value. More...
 
virtual scalar meanValue () const
 Return the mean value. More...
 
virtual void writeData (Ostream &os) const
 Write data to stream. More...
 
virtual void readData (Istream &os)
 Read data from stream. More...
 
virtual dictionary writeDict (const word &dictName) const
 Write data in dictionary format. More...
 
virtual void readDict (const dictionary &dict)
 Read data from dictionary. More...
 
- Public Member Functions inherited from distributionModel
 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)
 Construct copy. More...
 
virtual ~distributionModel ()
 Destructor. More...
 

Static Public Attributes

static const char * header
 

Additional Inherited Members

- Static Public Member Functions inherited from distributionModel
static autoPtr< distributionModelNew (const dictionary &dict, Random &rndGen)
 Selector. More...
 
- Protected Member Functions inherited from distributionModel
virtual void check () const
 Check that the distribution model is valid. More...
 
- Protected Attributes inherited from distributionModel
const dictionary distributionModelDict_
 Coefficients dictionary. More...
 
RandomrndGen_
 Reference to the random number generator. More...
 

Detailed Description

A binned distribution model where the random sample is taken from a discrete set of bins.

Source files

Definition at line 68 of file binned.H.

Constructor & Destructor Documentation

◆ binned() [1/3]

binned ( const dictionary dict,
Random rndGen 
)

Construct from dictionary.

Definition at line 84 of file binned.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, maxValue, and minValue.

Referenced by binned::clone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ binned() [2/3]

binned ( const UList< scalar > &  sampleData,
const scalar  binWidth,
Random rndGen 
)

Construct from components.

Definition at line 107 of file binned.C.

References Foam::endl(), forAll, Foam::mag(), Foam::max(), maxValue, Foam::min(), minValue, Foam::nl, and WarningInFunction.

Here is the call graph for this function:

◆ binned() [3/3]

binned ( const binned p)

Construct copy.

Definition at line 172 of file binned.C.

◆ ~binned()

~binned ( )
virtual

Destructor.

Definition at line 182 of file binned.C.

Member Function Documentation

◆ TypeName()

TypeName ( "binned"  )

Runtime type information.

◆ clone()

virtual autoPtr<distributionModel> clone ( ) const
inlinevirtual

Construct and return a clone.

Implements distributionModel.

Definition at line 114 of file binned.H.

References binned::binned().

Here is the call graph for this function:

◆ sample()

Foam::scalar sample ( ) const
virtual

Sample the distributionModel.

Implements distributionModel.

Definition at line 188 of file binned.C.

References y.

◆ minValue()

Foam::scalar minValue ( ) const
virtual

Return the minimum value.

Implements distributionModel.

Definition at line 204 of file binned.C.

◆ maxValue()

Foam::scalar maxValue ( ) const
virtual

Return the maximum value.

Implements distributionModel.

Definition at line 210 of file binned.C.

◆ meanValue()

Foam::scalar meanValue ( ) const
virtual

Return the mean value.

Implements distributionModel.

Definition at line 216 of file binned.C.

◆ writeData()

void writeData ( Ostream os) const
virtual

Write data to stream.

Definition at line 229 of file binned.C.

◆ readData()

void readData ( Istream os)
virtual

Read data from stream.

Definition at line 222 of file binned.C.

◆ writeDict()

Foam::dictionary writeDict ( const word dictName) const
virtual

Write data in dictionary format.

Definition at line 237 of file binned.C.

References dict, and dictName().

Here is the call graph for this function:

◆ readDict()

void readDict ( const dictionary dict)
virtual

Read data from dictionary.

Definition at line 249 of file binned.C.

References dict.

Member Data Documentation

◆ header

const char * header
static
Initial value:
=
"(bin probability)"

Definition at line 94 of file binned.H.


The documentation for this class was generated from the following files: