queso-0.53.0
List of all members
QUESO::GenericVectorRV< V, M > Class Template Reference

A templated class for handling generic vector RVs. More...

#include <GenericVectorRV.h>

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

Public Member Functions

Constructor/Destructor methods
 GenericVectorRV (const char *prefix, const VectorSet< V, M > &imageSet)
 Default constructor. More...
 
 GenericVectorRV (const char *prefix, const VectorSet< V, M > &imageSet, BaseJointPdf< V, M > &pdf, BaseVectorRealizer< V, M > &realizer, const BaseVectorCdf< V, M > &subCdf, const BaseVectorCdf< V, M > &unifiedCdf, const BaseVectorMdf< V, M > &mdf)
 Constructor. More...
 
virtual ~GenericVectorRV ()
 Virtual destructor. More...
 
Random variable-handling methods
void setPdf (BaseJointPdf< V, M > &pdf)
 Sets the PDF of this vector RV to pdf. More...
 
void setRealizer (BaseVectorRealizer< V, M > &realizer)
 Sets the realizer of this vector RV to realizer. More...
 
void setSubCdf (BaseVectorCdf< V, M > &subCdf)
 Sets the CDF of the sub-sequence of this vector RV to subCdf. More...
 
void setUnifiedCdf (BaseVectorCdf< V, M > &unifiedCdf)
 Sets the CDF of the unified sequence of this vector RV to unifiedCdf. More...
 
void setMdf (BaseVectorMdf< V, M > &mdf)
 Sets the MDF of this vector RV to Mdf. More...
 
I/O methods
void print (std::ostream &os) const
 TODO: Prints the vector RV. More...
 
- Public Member Functions inherited from QUESO::BaseVectorRV< V, M >
 BaseVectorRV (const char *prefix, const VectorSet< V, M > &imageSet)
 Constructor. More...
 
virtual ~BaseVectorRV ()
 Virtual destructor. More...
 
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...
 

Additional Inherited Members

- Protected Attributes inherited from QUESO::BaseVectorRV< V, M >
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
 

Detailed Description

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

A templated class for handling generic vector RVs.

This class allows the user to compute the value of the PDF of a generic random variable (RV) and to generate realizations (samples) from such PDF. This is the class used by QUESO to store the solution of an statistical inverse problem.

Definition at line 54 of file GenericVectorRV.h.

Constructor & Destructor Documentation

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

Default constructor.

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

Definition at line 33 of file GenericVectorRV.C.

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

36  :
37  BaseVectorRV<V,M>(((std::string)(prefix)+"gen").c_str(),imageSet)
38 {
39  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
40  *m_env.subDisplayFile() << "Entering GenericVectorRV<V,M>::constructor() [1]"
41  << ": prefix = " << m_prefix
42  << std::endl;
43  }
44 
45  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
46  *m_env.subDisplayFile() << "Leaving GenericVectorRV<V,M>::constructor() [1]"
47  << ": prefix = " << m_prefix
48  << std::endl;
49  }
50 }
unsigned int displayVerbosity() const
Definition: Environment.C:396
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 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
template<class V, class M>
QUESO::GenericVectorRV< V, M >::GenericVectorRV ( const char *  prefix,
const VectorSet< V, M > &  imageSet,
BaseJointPdf< V, M > &  pdf,
BaseVectorRealizer< V, M > &  realizer,
const BaseVectorCdf< V, M > &  subCdf,
const BaseVectorCdf< V, M > &  unifiedCdf,
const BaseVectorMdf< V, M > &  mdf 
)

Constructor.

Constructs a new instance, given all the attributes that characterize the vector RV: prefix, image set, pdf, etc.

Definition at line 53 of file GenericVectorRV.C.

References QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseVectorRV< V, M >::m_env, QUESO::BaseVectorRV< V, M >::m_mdf, QUESO::BaseVectorRV< V, M >::m_pdf, QUESO::BaseVectorRV< V, M >::m_prefix, QUESO::BaseVectorRV< V, M >::m_realizer, QUESO::BaseVectorRV< V, M >::m_subCdf, QUESO::BaseVectorRV< V, M >::m_unifiedCdf, QUESO::BaseVectorRV< V, M >::mdf(), QUESO::BaseVectorRV< V, M >::pdf(), QUESO::BaseVectorRV< V, M >::realizer(), QUESO::BaseVectorRV< V, M >::subCdf(), QUESO::BaseEnvironment::subDisplayFile(), and QUESO::BaseVectorRV< V, M >::unifiedCdf().

61  :
62  BaseVectorRV<V,M>(((std::string)(prefix)+"gen").c_str(),imageSet)
63 {
64  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
65  *m_env.subDisplayFile() << "Entering GenericVectorRV<V,M>::constructor() [2]"
66  << ": prefix = " << m_prefix
67  << std::endl;
68  }
69 
70  m_pdf = &pdf;
72  m_subCdf = &subCdf;
74  m_mdf = &mdf;
75 
76  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
77  *m_env.subDisplayFile() << "Leaving GenericVectorRV<V,M>::constructor() [2]"
78  << ": prefix = " << m_prefix
79  << std::endl;
80  }
81 }
unsigned int displayVerbosity() const
Definition: Environment.C:396
const BaseVectorRealizer< V, M > & realizer() const
Finds a realization (sample) of the PDF of this vector RV; access to private attribute m_realizer...
Definition: VectorRV.C:95
const BaseVectorCdf< V, M > & unifiedCdf() const
Finds the Cumulative Distribution Function of this vector RV, considering the unified sequence of dat...
Definition: VectorRV.C:113
const BaseVectorCdf< V, M > & subCdf() const
Finds the Cumulative Distribution Function of this vector RV, considering only the sub-sequence of da...
Definition: VectorRV.C:104
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 BaseJointPdf< V, M > & pdf() const
Posterior Density Function of the vector RV; access to private attribute m_pdf.
Definition: VectorRV.C:86
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 BaseVectorMdf< V, M > & mdf() const
Finds the Mass Density Function of this vector RV; access to private attribute m_mdf.
Definition: VectorRV.C: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::GenericVectorRV< V, M >::~GenericVectorRV ( )
virtual

Virtual destructor.

Definition at line 84 of file GenericVectorRV.C.

85 {
86 }

Member Function Documentation

template<class V , class M >
void QUESO::GenericVectorRV< V, M >::print ( std::ostream &  os) const
virtual

TODO: Prints the vector RV.

Todo:
: implement me!

Implements QUESO::BaseVectorRV< V, M >.

Definition at line 130 of file GenericVectorRV.C.

131 {
132  os << "GenericVectorRV<V,M>::print() says, 'Please implement me.'" << std::endl;
133  return;
134 }
template<class V, class M>
void QUESO::GenericVectorRV< V, M >::setMdf ( BaseVectorMdf< V, M > &  mdf)

Sets the MDF of this vector RV to Mdf.

Definition at line 122 of file GenericVectorRV.C.

123 {
124  m_mdf = &mdf;
125  return;
126 }
const BaseVectorMdf< V, M > * m_mdf
Definition: VectorRV.h:122
const BaseVectorMdf< V, M > & mdf() const
Finds the Mass Density Function of this vector RV; access to private attribute m_mdf.
Definition: VectorRV.C:122
template<class V, class M>
void QUESO::GenericVectorRV< V, M >::setPdf ( BaseJointPdf< V, M > &  pdf)

Sets the PDF of this vector RV to pdf.

Definition at line 90 of file GenericVectorRV.C.

Referenced by QUESO::MLSampling< P_V, P_M >::generateSequence_Step08_all().

91 {
92  m_pdf = &pdf;
93  return;
94 }
BaseJointPdf< V, M > * m_pdf
Definition: VectorRV.h:118
const BaseJointPdf< V, M > & pdf() const
Posterior Density Function of the vector RV; access to private attribute m_pdf.
Definition: VectorRV.C:86
template<class V, class M>
void QUESO::GenericVectorRV< V, M >::setRealizer ( BaseVectorRealizer< V, M > &  realizer)

Sets the realizer of this vector RV to realizer.

Definition at line 98 of file GenericVectorRV.C.

99 {
100  m_realizer = &realizer;
101  return;
102 }
const BaseVectorRealizer< V, M > & realizer() const
Finds a realization (sample) of the PDF of this vector RV; access to private attribute m_realizer...
Definition: VectorRV.C:95
BaseVectorRealizer< V, M > * m_realizer
Definition: VectorRV.h:119
template<class V, class M>
void QUESO::GenericVectorRV< V, M >::setSubCdf ( BaseVectorCdf< V, M > &  subCdf)

Sets the CDF of the sub-sequence of this vector RV to subCdf.

Definition at line 106 of file GenericVectorRV.C.

107 {
108  m_subCdf = &subCdf;
109  return;
110 }
const BaseVectorCdf< V, M > & subCdf() const
Finds the Cumulative Distribution Function of this vector RV, considering only the sub-sequence of da...
Definition: VectorRV.C:104
const BaseVectorCdf< V, M > * m_subCdf
Definition: VectorRV.h:120
template<class V, class M>
void QUESO::GenericVectorRV< V, M >::setUnifiedCdf ( BaseVectorCdf< V, M > &  unifiedCdf)

Sets the CDF of the unified sequence of this vector RV to unifiedCdf.

Definition at line 114 of file GenericVectorRV.C.

115 {
117  return;
118 }
const BaseVectorCdf< V, M > & unifiedCdf() const
Finds the Cumulative Distribution Function of this vector RV, considering the unified sequence of dat...
Definition: VectorRV.C:113
const BaseVectorCdf< V, M > * m_unifiedCdf
Definition: VectorRV.h:121

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