queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO::InverseGammaVectorRealizer< V, M > Class Template Reference

A class for handling sampling from an Inverse Gamma probability density distribution. More...

#include <InverseGammaVectorRealizer.h>

Inheritance diagram for QUESO::InverseGammaVectorRealizer< V, M >:
QUESO::BaseVectorRealizer< V, M >

Public Member Functions

Constructor/Destructor methods
 InverseGammaVectorRealizer (const char *prefix, const VectorSet< V, M > &unifiedImageSet, const V &alpha, const V &beta)
 Constructor. More...
 
 ~InverseGammaVectorRealizer ()
 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::InverseGammaVectorRealizer< V, M >

A class for handling sampling from an Inverse Gamma probability density distribution.

This class handles sampling from an Inverse Gamma probability density distribution, of parameters alpha and beta.

Definition at line 49 of file InverseGammaVectorRealizer.h.

Constructor & Destructor Documentation

template<class V , class M >
QUESO::InverseGammaVectorRealizer< V, M >::InverseGammaVectorRealizer ( 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 a and b, which are assigned to private attributes m_alpha and m_beta.

Definition at line 34 of file InverseGammaVectorRealizer.C.

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

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

Destructor.

Definition at line 58 of file InverseGammaVectorRealizer.C.

59 {
60 }

Member Function Documentation

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

Draws a realization.

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

Implements QUESO::BaseVectorRealizer< V, M >.

Definition at line 64 of file InverseGammaVectorRealizer.C.

65 {
66  nextValues.cwSetInverseGamma(m_alpha,m_beta);
67  return;
68 }

Member Data Documentation

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

Definition at line 80 of file InverseGammaVectorRealizer.h.

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

Definition at line 81 of file InverseGammaVectorRealizer.h.


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

Generated on Tue Jun 5 2018 19:49:30 for queso-0.57.1 by  doxygen 1.8.5