queso-0.50.1
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,2009,2010,2011,2012,2013 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/VectorSpace.h>
29 #include <queso/JointPdf.h>
30 #include <queso/GaussianJointPdf.h>
31 #include <queso/BetaJointPdf.h>
32 #include <queso/GammaJointPdf.h>
33 #include <queso/UniformJointPdf.h>
34 #include <queso/InverseGammaJointPdf.h>
35 #include <queso/WignerJointPdf.h>
36 #include <queso/LogNormalJointPdf.h>
37 #include <queso/ConcatenatedJointPdf.h>
38 #include <queso/VectorRealizer.h>
39 #include <queso/GaussianVectorRealizer.h>
40 #include <queso/UniformVectorRealizer.h>
41 #include <queso/BetaVectorRealizer.h>
42 #include <queso/GammaVectorRealizer.h>
43 #include <queso/InverseGammaVectorRealizer.h>
44 #include <queso/WignerVectorRealizer.h>
45 #include <queso/LogNormalVectorRealizer.h>
46 #include <queso/ConcatenatedVectorRealizer.h>
47 #include <queso/VectorCdf.h>
48 #include <queso/VectorMdf.h>
49 #include <queso/SequenceOfVectors.h>
50 #include <queso/InfoTheory.h>
51 #include <gsl/gsl_sf_psi.h> // todo: take specificity of gsl_, i.e., make it general (gsl or boost or etc)
52 
53 namespace QUESO {
54 
55 //*****************************************************
56 // Base class [RV-00]
57 //*****************************************************
58 
68 template<class V, class M>
69 class BaseVectorRV {
70 public:
72 
73 
77  BaseVectorRV(const char* prefix,
78  const VectorSet<V,M>& imageSet);
79 
81  virtual ~BaseVectorRV();
83 
85 
86  const BaseEnvironment& env () const;
88 
90  const VectorSet <V,M>& imageSet () const;
91 
93  const BaseJointPdf <V,M>& pdf () const;
94 
96  const BaseVectorRealizer<V,M>& realizer () const;
97 
99  const BaseVectorCdf <V,M>& subCdf () const;
100 
102  const BaseVectorCdf <V,M>& unifiedCdf() const;
103 
105  const BaseVectorMdf <V,M>& mdf () const;
107 
109 
110 
112  virtual void print (std::ostream& os) const = 0;
113  friend std::ostream& operator<<(std::ostream& os,
114  const BaseVectorRV<V,M>& obj) {
115  obj.print(os);
116  return os;
117  }
119 
120 #ifdef QUESO_HAS_ANN
121  virtual double estimateENT_ANN() const;
122  /*
123  virtual double estimateENT_ANN( unsigned int k, double eps ) const;
124  virtual double estimateENTSubset_ANN( const unsigned int dimSel[] ) const;
125  virtual double estimateENTSubset_ANN( const unsigned int dimSel[], unsigned int k, double eps ) const;
126  */
127 #endif // QUESO_HAS_ANN
128 
129 protected:
131  std::string m_prefix;
138 };
139 
140 //---------------------------------------------------
141 // Method declared outside class definition ---------
142 //---------------------------------------------------
143 template <class P_V, class P_M, class Q_V, class Q_M>
144 void
146  const BaseVectorRV<P_V,P_M>& paramRv,
147  const BaseVectorRV<Q_V,Q_M>& qoiRv,
148  unsigned int localNumSamples,
149  P_M& pqCovMatrix,
150  P_M& pqCorrMatrix);
151 
152 } // End namespace QUESO
153 
154 #endif // UQ_VECTOR_RV_H
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
const BaseVectorCdf< V, M > * m_unifiedCdf
Definition: VectorRV.h:136
A templated base class for handling vector RV.
Definition: VectorRV.h:69
const BaseEnvironment & m_env
Definition: VectorRV.h:130
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
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:187
const VectorSet< V, M > & m_imageSet
Definition: VectorRV.h:132
virtual void print(std::ostream &os) const =0
TODO: Prints the vector RV.
const BaseVectorCdf< V, M > * m_subCdf
Definition: VectorRV.h:135
BaseVectorRealizer< V, M > * m_realizer
Definition: VectorRV.h:134
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
BaseVectorRV(const char *prefix, const VectorSet< V, M > &imageSet)
Constructor.
Definition: VectorRV.C:33
A templated (base) class for handling sampling from vector RVs.
A templated class for handling sets.
Definition: VectorSet.h:49
const BaseVectorMdf< V, M > * m_mdf
Definition: VectorRV.h:137
const VectorSet< V, M > & imageSet() const
Image set of the vector RV; access to private attribute m_imageSet.
Definition: VectorRV.C:79
friend std::ostream & operator<<(std::ostream &os, const BaseVectorRV< V, M > &obj)
Definition: VectorRV.h:113
std::string m_prefix
Definition: VectorRV.h:131
BaseJointPdf< V, M > * m_pdf
Definition: VectorRV.h:133
A templated (base) class for handling MDFs of vector functions.
Definition: VectorMdf.h:56
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
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
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
A templated (base) class for handling joint PDFs.
Definition: JointPdf.h:60

Generated on Thu Apr 23 2015 19:18:34 for queso-0.50.1 by  doxygen 1.8.5