queso-0.52.0
VectorRV.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef UQ_VECTOR_RV_H
26 #define UQ_VECTOR_RV_H
27 
28 #include <queso/Environment.h>
29 #include <queso/VectorSet.h>
30 #include <queso/VectorSpace.h>
31 #include <queso/JointPdf.h>
32 #include <queso/VectorRealizer.h>
33 #include <queso/VectorCdf.h>
34 #include <queso/VectorMdf.h>
35 #include <queso/SequenceOfVectors.h>
36 #include <queso/InfoTheory.h>
37 
38 namespace QUESO {
39 
50 template<class V, class M>
51 class BaseVectorRV {
52 public:
54 
55 
59  BaseVectorRV(const char* prefix,
60  const VectorSet<V,M>& imageSet);
61 
63  virtual ~BaseVectorRV();
65 
67 
68  const BaseEnvironment& env () const;
70 
72  const VectorSet <V,M>& imageSet () const;
73 
75  const BaseJointPdf <V,M>& pdf () const;
76 
78  const BaseVectorRealizer<V,M>& realizer () const;
79 
81  const BaseVectorCdf <V,M>& subCdf () const;
82 
84  const BaseVectorCdf <V,M>& unifiedCdf() const;
85 
87  const BaseVectorMdf <V,M>& mdf () const;
89 
91 
92 
94  virtual void print (std::ostream& os) const = 0;
95  friend std::ostream& operator<<(std::ostream& os,
96  const BaseVectorRV<V,M>& obj) {
97  obj.print(os);
98  return os;
99  }
101 
102 #ifdef QUESO_HAS_ANN
103  virtual double estimateENT_ANN() const;
104  /*
105  virtual double estimateENT_ANN( unsigned int k, double eps ) const;
106  virtual double estimateENTSubset_ANN( const unsigned int dimSel[] ) const;
107  virtual double estimateENTSubset_ANN( const unsigned int dimSel[], unsigned int k, double eps ) const;
108  */
109 #endif // QUESO_HAS_ANN
110 
111 protected:
113  std::string m_prefix;
120 };
121 
122 //---------------------------------------------------
123 // Method declared outside class definition ---------
124 //---------------------------------------------------
125 template <class P_V, class P_M, class Q_V, class Q_M>
126 void
128  const BaseVectorRV<P_V,P_M>& paramRv,
129  const BaseVectorRV<Q_V,Q_M>& qoiRv,
130  unsigned int localNumSamples,
131  P_M& pqCovMatrix,
132  P_M& pqCorrMatrix);
133 
134 } // End namespace QUESO
135 
136 #endif // UQ_VECTOR_RV_H
const VectorSet< V, M > & imageSet() const
Image set of the vector RV; access to private attribute m_imageSet.
Definition: VectorRV.C:79
A templated (base) class for handling MDFs of vector functions.
Definition: VectorMdf.h:56
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:98
std::string m_prefix
Definition: VectorRV.h:113
A templated class for handling sets.
Definition: VectorSet.h:49
friend std::ostream & operator<<(std::ostream &os, const BaseVectorRV< V, M > &obj)
Definition: VectorRV.h:95
void ComputeCovCorrMatricesBetweenVectorRvs(const BaseVectorRV< P_V, P_M > &paramRv, const BaseVectorRV< Q_V, Q_M > &qoiRv, unsigned int localNumSamples, P_M &pqCovMatrix, P_M &pqCorrMatrix)
Definition: VectorRV.C:213
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:187
const BaseVectorMdf< V, M > * m_mdf
Definition: VectorRV.h:119
const VectorSet< V, M > & m_imageSet
Definition: VectorRV.h:114
const BaseVectorCdf< V, M > & unifiedCdf() const
Finds the Cumulative Distribution Function of this vector RV, considering the unified sequence of dat...
Definition: VectorRV.C:122
const BaseJointPdf< V, M > & pdf() const
Posterior Density Function of the vector RV; access to private attribute m_pdf.
Definition: VectorRV.C:86
A templated base class for handling vector RV.
Definition: VectorRV.h:51
BaseJointPdf< V, M > * m_pdf
Definition: VectorRV.h:115
A templated (base) class for handling joint PDFs.
Definition: JointPdf.h:60
const BaseVectorCdf< V, M > * m_subCdf
Definition: VectorRV.h:117
const BaseVectorCdf< V, M > * m_unifiedCdf
Definition: VectorRV.h:118
const BaseEnvironment & m_env
Definition: VectorRV.h:112
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:110
A templated (base) class for handling sampling from vector RVs.
const BaseVectorMdf< V, M > & mdf() const
Finds the Mass Density Function of this vector RV; access to private attribute m_mdf.
Definition: VectorRV.C:134
virtual ~BaseVectorRV()
Virtual destructor.
Definition: VectorRV.C:60
A templated (base) class for handling CDFs of vector functions.
Definition: VectorCdf.h:56
const BaseEnvironment & env() const
QUESO environment; access to private attribute m_env.
Definition: VectorRV.C:72
virtual void print(std::ostream &os) const =0
TODO: Prints the vector RV.
BaseVectorRV(const char *prefix, const VectorSet< V, M > &imageSet)
Constructor.
Definition: VectorRV.C:33
BaseVectorRealizer< V, M > * m_realizer
Definition: VectorRV.h:116

Generated on Thu Apr 23 2015 19:30:54 for queso-0.52.0 by  doxygen 1.8.5