queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
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-2017 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 
37 namespace QUESO {
38 
39 class GslVector;
40 class GslMatrix;
41 
52 template <class V = GslVector, class M = GslMatrix>
53 class BaseVectorRV {
54 public:
56 
57 
61  BaseVectorRV(const char* prefix,
62  const VectorSet<V,M>& imageSet);
63 
65  virtual ~BaseVectorRV();
67 
69 
70  const BaseEnvironment& env () const;
72 
74  const VectorSet <V,M>& imageSet () const;
75 
77  const BaseJointPdf <V,M>& pdf () const;
78 
80  bool has_realizer () const;
81 
83  const BaseVectorRealizer<V,M>& realizer () const;
84 
86  const BaseVectorCdf <V,M>& subCdf () const;
87 
89  const BaseVectorCdf <V,M>& unifiedCdf() const;
90 
92  const BaseVectorMdf <V,M>& mdf () const;
94 
96 
97 
99  virtual void print (std::ostream& os) const = 0;
100  friend std::ostream& operator<<(std::ostream& os,
101  const BaseVectorRV<V,M>& obj) {
102  obj.print(os);
103  return os;
104  }
106 
107 #ifdef QUESO_HAS_ANN
108  virtual double estimateENT_ANN() const;
109  /*
110  virtual double estimateENT_ANN( unsigned int k, double eps ) const;
111  virtual double estimateENTSubset_ANN( const unsigned int dimSel[] ) const;
112  virtual double estimateENTSubset_ANN( const unsigned int dimSel[], unsigned int k, double eps ) const;
113  */
114 #endif // QUESO_HAS_ANN
115 
116 protected:
118  std::string m_prefix;
125 };
126 
127 //---------------------------------------------------
128 // Method declared outside class definition ---------
129 //---------------------------------------------------
130 template <class P_V, class P_M, class Q_V, class Q_M>
131 void
133  const BaseVectorRV<P_V,P_M>& paramRv,
134  const BaseVectorRV<Q_V,Q_M>& qoiRv,
135  unsigned int localNumSamples,
136  P_M& pqCovMatrix,
137  P_M& pqCorrMatrix);
138 
139 } // End namespace QUESO
140 
141 #endif // UQ_VECTOR_RV_H
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
A templated (base) class for handling sampling from vector RVs.
virtual void print(std::ostream &os) const =0
TODO: Prints the vector RV.
const BaseVectorCdf< V, M > * m_unifiedCdf
Definition: VectorRV.h:123
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:198
friend std::ostream & operator<<(std::ostream &os, const BaseVectorRV< V, M > &obj)
Definition: VectorRV.h:100
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
A templated (base) class for handling MDFs of vector functions.
Definition: VectorMdf.h:52
A templated (base) class for handling CDFs of vector functions.
Definition: VectorCdf.h:53
A templated class for handling sets.
Definition: VectorSet.h:52
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
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:209
A templated (base) class for handling joint PDFs.
Definition: JointPdf.h:55
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
BaseVectorRV(const char *prefix, const VectorSet< V, M > &imageSet)
Constructor.
Definition: VectorRV.C:37
virtual double estimateENT_ANN() const
Definition: VectorRV.C:144
const BaseEnvironment & env() const
QUESO environment; access to private attribute m_env.
Definition: VectorRV.C:76
A templated base class for handling vector RV.
Definition: VectorRV.h:53
const BaseVectorCdf< V, M > * m_subCdf
Definition: VectorRV.h:122
virtual ~BaseVectorRV()
Virtual destructor.
Definition: VectorRV.C:64
bool has_realizer() const
Returns true iff this RV has the ability to produce realizations (samples)
Definition: VectorRV.C:99
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 VectorSet< V, M > & m_imageSet
Definition: VectorRV.h:119
const BaseVectorMdf< V, M > * m_mdf
Definition: VectorRV.h:124

Generated on Tue Jun 5 2018 19:48:55 for queso-0.57.1 by  doxygen 1.8.5