queso-0.53.0
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 = GslVector, class M = GslMatrix>
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 49 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 35 of file BetaVectorRealizer.C.

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

40  :
41  BaseVectorRealizer<V,M>(((std::string)(prefix)+"gen").c_str(),unifiedImageSet,std::numeric_limits<unsigned int>::max()),
42  m_alpha(alpha),
43  m_beta (beta)
44 {
45  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
46  *m_env.subDisplayFile() << "Entering BetaVectorRealizer<V,M>::constructor()"
47  << ": prefix = " << m_prefix
48  << std::endl;
49  }
50 
51  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
52  *m_env.subDisplayFile() << "Leaving BetaVectorRealizer<V,M>::constructor()"
53  << ": prefix = " << m_prefix
54  << std::endl;
55  }
56 }
unsigned int displayVerbosity() const
Definition: Environment.C:396
const BaseEnvironment & m_env
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
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 59 of file BetaVectorRealizer.C.

60 {
61 }

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 65 of file BetaVectorRealizer.C.

66 {
67  nextValues.cwSetBeta(m_alpha,m_beta);
68  return;
69 }

Member Data Documentation

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

Definition at line 81 of file BetaVectorRealizer.h.

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

Definition at line 82 of file BetaVectorRealizer.h.


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

Generated on Thu Jun 11 2015 13:52:35 for queso-0.53.0 by  doxygen 1.8.5