queso-0.53.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 
40 class GslVector;
41 class GslMatrix;
42 
53 template <class V = GslVector, class M = GslMatrix>
54 class BaseVectorRV {
55 public:
57 
58 
62  BaseVectorRV(const char* prefix,
63  const VectorSet<V,M>& imageSet);
64 
66  virtual ~BaseVectorRV();
68 
70 
71  const BaseEnvironment& env () const;
73 
75  const VectorSet <V,M>& imageSet () const;
76 
78  const BaseJointPdf <V,M>& pdf () const;
79 
81  const BaseVectorRealizer<V,M>& realizer () const;
82 
84  const BaseVectorCdf <V,M>& subCdf () const;
85 
87  const BaseVectorCdf <V,M>& unifiedCdf() const;
88 
90  const BaseVectorMdf <V,M>& mdf () const;
92 
94 
95 
97  virtual void print (std::ostream& os) const = 0;
98  friend std::ostream& operator<<(std::ostream& os,
99  const BaseVectorRV<V,M>& obj) {
100  obj.print(os);
101  return os;
102  }
104 
105 #ifdef QUESO_HAS_ANN
106  virtual double estimateENT_ANN() const;
107  /*
108  virtual double estimateENT_ANN( unsigned int k, double eps ) const;
109  virtual double estimateENTSubset_ANN( const unsigned int dimSel[] ) const;
110  virtual double estimateENTSubset_ANN( const unsigned int dimSel[], unsigned int k, double eps ) const;
111  */
112 #endif // QUESO_HAS_ANN
113 
114 protected:
116  std::string m_prefix;
123 };
124 
125 //---------------------------------------------------
126 // Method declared outside class definition ---------
127 //---------------------------------------------------
128 template <class P_V, class P_M, class Q_V, class Q_M>
129 void
131  const BaseVectorRV<P_V,P_M>& paramRv,
132  const BaseVectorRV<Q_V,Q_M>& qoiRv,
133  unsigned int localNumSamples,
134  P_M& pqCovMatrix,
135  P_M& pqCorrMatrix);
136 
137 } // End namespace QUESO
138 
139 #endif // UQ_VECTOR_RV_H
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
A templated class for handling sets.
Definition: VectorSet.h:52
const VectorSet< V, M > & m_imageSet
Definition: VectorRV.h:117
BaseVectorRV(const char *prefix, const VectorSet< V, M > &imageSet)
Constructor.
Definition: VectorRV.C:33
A templated base class for handling vector RV.
Definition: VectorRV.h:54
const BaseEnvironment & env() const
QUESO environment; access to private attribute m_env.
Definition: VectorRV.C:72
A templated (base) class for handling joint PDFs.
Definition: JointPdf.h:56
A templated (base) class for handling CDFs of vector functions.
Definition: VectorCdf.h:53
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:198
virtual ~BaseVectorRV()
Virtual destructor.
Definition: VectorRV.C:60
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
A templated (base) class for handling sampling from vector RVs.
const BaseJointPdf< V, M > & pdf() const
Posterior Density Function of the vector RV; access to private attribute m_pdf.
Definition: VectorRV.C:86
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
virtual void print(std::ostream &os) const =0
TODO: Prints the vector RV.
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
A templated (base) class for handling MDFs of vector functions.
Definition: VectorMdf.h:52
const BaseVectorMdf< V, M > * m_mdf
Definition: VectorRV.h:122
friend std::ostream & operator<<(std::ostream &os, const BaseVectorRV< V, M > &obj)
Definition: VectorRV.h:98
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

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