queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
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 >:
QUESO::BaseVectorRV< V, M >

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 >
virtual double estimateENT_ANN () const
 
 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...
 
bool has_realizer () const
 Returns true iff this RV has the ability to produce realizations (samples) 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 Marginal 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 52 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 }
std::string m_prefix
Definition: VectorRV.h:118
const BaseEnvironment & m_env
Definition: VectorRV.h:117
const VectorSet< V, M > & imageSet() const
Image set of the vector RV; access to private attribute m_imageSet.
Definition: VectorRV.C:83
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::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 }
std::string m_prefix
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:90
const BaseVectorCdf< V, M > * m_unifiedCdf
Definition: VectorRV.h:123
const BaseEnvironment & m_env
Definition: VectorRV.h:117
const VectorSet< V, M > & imageSet() const
Image set of the vector RV; access to private attribute m_imageSet.
Definition: VectorRV.C:83
const BaseVectorMdf< V, M > & mdf() const
Finds the Marginal Density Function of this vector RV; access to private attribute m_mdf...
Definition: VectorRV.C:133
BaseVectorRealizer< V, M > * m_realizer
Definition: VectorRV.h:121
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:115
BaseJointPdf< V, M > * m_pdf
Definition: VectorRV.h:120
const BaseVectorCdf< V, M > * m_subCdf
Definition: VectorRV.h:122
unsigned int displayVerbosity() const
Definition: Environment.C:450
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:106
const BaseVectorCdf< V, M > & unifiedCdf() const
Finds the Cumulative Distribution Function of this vector RV, considering the unified sequence of dat...
Definition: VectorRV.C:124
const BaseVectorMdf< V, M > * m_mdf
Definition: VectorRV.h:124
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320
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 > & mdf() const
Finds the Marginal Density Function of this vector RV; access to private attribute m_mdf...
Definition: VectorRV.C:133
const BaseVectorMdf< V, M > * m_mdf
Definition: VectorRV.h:124
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 }
const BaseJointPdf< V, M > & pdf() const
Posterior Density Function of the vector RV; access to private attribute m_pdf.
Definition: VectorRV.C:90
BaseJointPdf< V, M > * m_pdf
Definition: VectorRV.h:120
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 }
BaseVectorRealizer< V, M > * m_realizer
Definition: VectorRV.h:121
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:106
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:115
const BaseVectorCdf< V, M > * m_subCdf
Definition: VectorRV.h:122
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 > * m_unifiedCdf
Definition: VectorRV.h:123
const BaseVectorCdf< V, M > & unifiedCdf() const
Finds the Cumulative Distribution Function of this vector RV, considering the unified sequence of dat...
Definition: VectorRV.C:124

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

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