queso-0.53.0
Protected Attributes | List of all members
QUESO::BaseVectorRV< V, M > Class Template Referenceabstract

A templated base class for handling vector RV. More...

#include <VectorRV.h>

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

Public Member Functions

Constructor/Destructor methods
 BaseVectorRV (const char *prefix, const VectorSet< V, M > &imageSet)
 Constructor. More...
 
virtual ~BaseVectorRV ()
 Virtual destructor. More...
 
Random variable-handling methods
const BaseEnvironmentenv () const
 QUESO environment; access to private attribute m_env. More...
 
const VectorSet< V, M > & imageSet () const
 Image set of the vector RV; access to private attribute m_imageSet. More...
 
const BaseJointPdf< V, M > & pdf () const
 Posterior Density Function of the vector RV; access to private attribute m_pdf. More...
 
const BaseVectorRealizer< V, M > & realizer () const
 Finds a realization (sample) of the PDF of this vector RV; access to private attribute m_realizer. More...
 
const BaseVectorCdf< V, M > & subCdf () const
 Finds the Cumulative Distribution Function of this vector RV, considering only the sub-sequence of data; access to private attribute m_subCdf. More...
 
const BaseVectorCdf< V, M > & unifiedCdf () const
 Finds the Cumulative Distribution Function of this vector RV, considering the unified sequence of data; access to private attribute m_unifiedCdf. More...
 
const BaseVectorMdf< V, M > & mdf () const
 Finds the Mass Density Function of this vector RV; access to private attribute m_mdf. More...
 

Protected Attributes

const BaseEnvironmentm_env
 
std::string m_prefix
 
const VectorSet< V, M > & m_imageSet
 
BaseJointPdf< V, M > * m_pdf
 
BaseVectorRealizer< V, M > * m_realizer
 
const BaseVectorCdf< V, M > * m_subCdf
 
const BaseVectorCdf< V, M > * m_unifiedCdf
 
const BaseVectorMdf< V, M > * m_mdf
 

I/O methods

virtual void print (std::ostream &os) const =0
 TODO: Prints the vector RV. More...
 
std::ostream & operator<< (std::ostream &os, const BaseVectorRV< V, M > &obj)
 

Detailed Description

template<class V = GslVector, class M = GslMatrix>
class QUESO::BaseVectorRV< V, M >

A templated base class for handling vector RV.

This class allows two basic but quite crucial functionalities: to compute the value of the PDF of a random variable (RV) at a point and to generate realizations (samples) from such PDF.

Definition at line 54 of file VectorRV.h.

Constructor & Destructor Documentation

template<class V, class M>
QUESO::BaseVectorRV< V, M >::BaseVectorRV ( const char *  prefix,
const VectorSet< V, M > &  imageSet 
)

Constructor.

Constructs a new instance of BaseVectorRV, given a prefix and the image set of the vector RV.

Definition at line 33 of file VectorRV.C.

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

36  :
37  m_env (imageSet.env()),
38  m_prefix ((std::string)(prefix)+"rv_"),
40  m_pdf (NULL),
41  m_realizer (NULL),
42  m_subCdf (NULL),
43  m_unifiedCdf(NULL),
44  m_mdf (NULL)
45 {
46  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
47  *m_env.subDisplayFile() << "Entering BaseVectorRV<V,M>::constructor()"
48  << ": prefix = " << m_prefix
49  << std::endl;
50  }
51 
52  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
53  *m_env.subDisplayFile() << "Leaving BaseVectorRV<V,M>::constructor()"
54  << ": prefix = " << m_prefix
55  << std::endl;
56  }
57 }
unsigned int displayVerbosity() const
Definition: Environment.C:396
const VectorSet< V, M > & m_imageSet
Definition: VectorRV.h:117
BaseJointPdf< V, M > * m_pdf
Definition: VectorRV.h:118
std::string m_prefix
Definition: VectorRV.h:116
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
const BaseVectorCdf< V, M > * m_unifiedCdf
Definition: VectorRV.h:121
const BaseEnvironment & m_env
Definition: VectorRV.h:115
const VectorSet< V, M > & imageSet() const
Image set of the vector RV; access to private attribute m_imageSet.
Definition: VectorRV.C:79
const BaseVectorMdf< V, M > * m_mdf
Definition: VectorRV.h:122
const BaseVectorCdf< V, M > * m_subCdf
Definition: VectorRV.h:120
BaseVectorRealizer< V, M > * m_realizer
Definition: VectorRV.h:119
template<class V , class M >
QUESO::BaseVectorRV< V, M >::~BaseVectorRV ( )
virtual

Virtual destructor.

Definition at line 60 of file VectorRV.C.

61 {
62  //if (m_mdf ) delete m_mdf;
63  //if (m_subCdf ) delete m_subCdf;
64  //if (m_unifiedCdf) delete m_unifiedCdf;
65  //if (m_realizer ) delete m_realizer;
66  //if (m_pdf ) delete m_pdf;
67 }

Member Function Documentation

template<class V , class M >
const BaseEnvironment & QUESO::BaseVectorRV< V, M >::env ( ) const

QUESO environment; access to private attribute m_env.

Definition at line 72 of file VectorRV.C.

Referenced by QUESO::ComputeCovCorrMatricesBetweenVectorRvs().

73 {
74  return m_env;
75 }
const BaseEnvironment & m_env
Definition: VectorRV.h:115
template<class V , class M >
const VectorSet< V, M > & QUESO::BaseVectorRV< V, M >::imageSet ( ) const
template<class V , class M >
const BaseVectorMdf< V, M > & QUESO::BaseVectorRV< V, M >::mdf ( ) const

Finds the Mass Density Function of this vector RV; access to private attribute m_mdf.

Definition at line 122 of file VectorRV.C.

References queso_require_msg.

Referenced by QUESO::GenericVectorRV< V, M >::GenericVectorRV().

123 {
124  queso_require_msg(m_mdf, "m_mdf is NULL");
125 
126  return *m_mdf;
127 }
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69
const BaseVectorMdf< V, M > * m_mdf
Definition: VectorRV.h:122
template<class V , class M >
const BaseJointPdf< V, M > & QUESO::BaseVectorRV< V, M >::pdf ( ) const

Posterior Density Function of the vector RV; access to private attribute m_pdf.

Definition at line 86 of file VectorRV.C.

References queso_require_msg.

Referenced by QUESO::GenericVectorRV< V, M >::GenericVectorRV().

87 {
88  queso_require_msg(m_pdf, "m_pdf is NULL");
89 
90  return *m_pdf;
91 }
BaseJointPdf< V, M > * m_pdf
Definition: VectorRV.h:118
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69
template<class V = GslVector, class M = GslMatrix>
virtual void QUESO::BaseVectorRV< V, M >::print ( std::ostream &  os) const
pure virtual
template<class V , class M >
const BaseVectorRealizer< V, M > & QUESO::BaseVectorRV< V, M >::realizer ( ) const

Finds a realization (sample) of the PDF of this vector RV; access to private attribute m_realizer.

Definition at line 95 of file VectorRV.C.

References queso_require_msg.

Referenced by QUESO::MonteCarloSG< P_V, P_M, Q_V, Q_M >::actualGenerateSequence(), QUESO::MonteCarloSG< P_V, P_M, Q_V, Q_M >::actualReadSequence(), QUESO::ComputeCovCorrMatricesBetweenVectorRvs(), QUESO::GenericVectorRV< V, M >::GenericVectorRV(), and QUESO::MonteCarloSG< P_V, P_M, Q_V, Q_M >::internGenerateSequence().

96 {
97  queso_require_msg(m_realizer, "m_realizer is NULL");
98 
99  return *m_realizer;
100 }
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69
BaseVectorRealizer< V, M > * m_realizer
Definition: VectorRV.h:119
template<class V , class M >
const BaseVectorCdf< V, M > & QUESO::BaseVectorRV< V, M >::subCdf ( ) const

Finds the Cumulative Distribution Function of this vector RV, considering only the sub-sequence of data; access to private attribute m_subCdf.

Definition at line 104 of file VectorRV.C.

References queso_require_msg.

Referenced by QUESO::GenericVectorRV< V, M >::GenericVectorRV().

105 {
106  queso_require_msg(m_subCdf, "m_subCdf is NULL");
107 
108  return *m_subCdf;
109 }
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69
const BaseVectorCdf< V, M > * m_subCdf
Definition: VectorRV.h:120
template<class V , class M >
const BaseVectorCdf< V, M > & QUESO::BaseVectorRV< V, M >::unifiedCdf ( ) const

Finds the Cumulative Distribution Function of this vector RV, considering the unified sequence of data; access to private attribute m_unifiedCdf.

Definition at line 113 of file VectorRV.C.

References queso_require_msg.

Referenced by QUESO::GenericVectorRV< V, M >::GenericVectorRV().

114 {
115  queso_require_msg(m_unifiedCdf, "m_unifiedCdf is NULL");
116 
117  return *m_unifiedCdf;
118 }
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69
const BaseVectorCdf< V, M > * m_unifiedCdf
Definition: VectorRV.h:121

Friends And Related Function Documentation

template<class V = GslVector, class M = GslMatrix>
std::ostream& operator<< ( std::ostream &  os,
const BaseVectorRV< V, M > &  obj 
)
friend

Definition at line 98 of file VectorRV.h.

99  {
100  obj.print(os);
101  return os;
102  }

Member Data Documentation

template<class V = GslVector, class M = GslMatrix>
const BaseEnvironment& QUESO::BaseVectorRV< V, M >::m_env
protected
template<class V = GslVector, class M = GslMatrix>
const VectorSet<V,M>& QUESO::BaseVectorRV< V, M >::m_imageSet
protected
template<class V = GslVector, class M = GslMatrix>
const BaseVectorMdf<V,M>* QUESO::BaseVectorRV< V, M >::m_mdf
protected
template<class V = GslVector, class M = GslMatrix>
BaseJointPdf<V,M>* QUESO::BaseVectorRV< V, M >::m_pdf
protected
template<class V = GslVector, class M = GslMatrix>
std::string QUESO::BaseVectorRV< V, M >::m_prefix
protected
template<class V = GslVector, class M = GslMatrix>
BaseVectorRealizer<V,M>* QUESO::BaseVectorRV< V, M >::m_realizer
protected
template<class V = GslVector, class M = GslMatrix>
const BaseVectorCdf<V,M>* QUESO::BaseVectorRV< V, M >::m_subCdf
protected
template<class V = GslVector, class M = GslMatrix>
const BaseVectorCdf<V,M>* QUESO::BaseVectorRV< V, M >::m_unifiedCdf
protected

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

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