queso-0.51.1
Private Attributes | List of all members
QUESO::BetaVectorRealizer< V, M > Class Template Reference

A class for handling sampling from a Beta probability density distribution. More...

#include <BetaVectorRealizer.h>

Inheritance diagram for QUESO::BetaVectorRealizer< V, M >:
Inheritance graph
[legend]
Collaboration diagram for QUESO::BetaVectorRealizer< V, M >:
Collaboration graph
[legend]

Public Member Functions

Constructor/Destructor methods
 BetaVectorRealizer (const char *prefix, const VectorSet< V, M > &unifiedImageSet, const V &alpha, const V &beta)
 Constructor. More...
 
 ~BetaVectorRealizer ()
 Destructor. More...
 
Realization-related methods
void realization (V &nextValues) const
 Draws a realization. More...
 
- Public Member Functions inherited from QUESO::BaseVectorRealizer< V, M >
 BaseVectorRealizer (const char *prefix, const VectorSet< V, M > &unifiedImageSet, unsigned int subPeriod)
 Default constructor. More...
 
virtual ~BaseVectorRealizer ()
 Virtual destructor. More...
 
const VectorSet< V, M > & unifiedImageSet () const
 Image set where the realizations lie. Access to protected attribute m_unifiedImageSet. More...
 
unsigned int subPeriod () const
 Sub-period of the realization. Access to protected attribute m_subPeriod. More...
 

Private Attributes

m_alpha
 
m_beta
 

Additional Inherited Members

- Protected Attributes inherited from QUESO::BaseVectorRealizer< V, M >
const BaseEnvironmentm_env
 
std::string m_prefix
 
const VectorSet< V, M > & m_unifiedImageSet
 
unsigned int m_subPeriod
 

Detailed Description

template<class V, class M>
class QUESO::BetaVectorRealizer< V, M >

A class for handling sampling from a Beta probability density distribution.

This class handles sampling from a Beta probability density distribution, of parameters alpha and beta.

Definition at line 46 of file BetaVectorRealizer.h.

Constructor & Destructor Documentation

template<class V , class M >
QUESO::BetaVectorRealizer< V, M >::BetaVectorRealizer ( const char *  prefix,
const VectorSet< V, M > &  unifiedImageSet,
const V &  alpha,
const V &  beta 
)

Constructor.

Constructs a new object, given a prefix, the image set of the vector realizer, and the Beta distribution parameters alpha and beta, which are assigned to private attributes m_alpha and m_beta.

Definition at line 33 of file BetaVectorRealizer.C.

References QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseVectorRealizer< V, M >::m_env, QUESO::BaseVectorRealizer< V, M >::m_prefix, and QUESO::BaseEnvironment::subDisplayFile().

38  :
39  BaseVectorRealizer<V,M>(((std::string)(prefix)+"gen").c_str(),unifiedImageSet,std::numeric_limits<unsigned int>::max()),
40  m_alpha(alpha),
41  m_beta (beta)
42 {
43  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
44  *m_env.subDisplayFile() << "Entering BetaVectorRealizer<V,M>::constructor()"
45  << ": prefix = " << m_prefix
46  << std::endl;
47  }
48 
49  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
50  *m_env.subDisplayFile() << "Leaving BetaVectorRealizer<V,M>::constructor()"
51  << ": prefix = " << m_prefix
52  << std::endl;
53  }
54 }
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:305
const BaseEnvironment & m_env
unsigned int displayVerbosity() const
Definition: Environment.C:436
const VectorSet< V, M > & unifiedImageSet() const
Image set where the realizations lie. Access to protected attribute m_unifiedImageSet.
template<class V , class M >
QUESO::BetaVectorRealizer< V, M >::~BetaVectorRealizer ( )

Destructor.

Definition at line 57 of file BetaVectorRealizer.C.

58 {
59 }

Member Function Documentation

template<class V , class M >
void QUESO::BetaVectorRealizer< V, M >::realization ( V &  nextValues) const
virtual

Draws a realization.

This function draws a realization of a Beta distribution and saves it in nextValues. It internally checks whether the image set, where the realization should be drawn, belongs to the interval (0, 1] - which is the range where Beta distribution is defined over.

Implements QUESO::BaseVectorRealizer< V, M >.

Definition at line 63 of file BetaVectorRealizer.C.

64 {
65  nextValues.cwSetBeta(m_alpha,m_beta);
66  return;
67 }

Member Data Documentation

template<class V, class M>
V QUESO::BetaVectorRealizer< V, M >::m_alpha
private

Definition at line 78 of file BetaVectorRealizer.h.

template<class V, class M>
V QUESO::BetaVectorRealizer< V, M >::m_beta
private

Definition at line 79 of file BetaVectorRealizer.h.


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

Generated on Thu Apr 23 2015 19:26:17 for queso-0.51.1 by  doxygen 1.8.5