queso-0.51.1
GaussianVectorRealizer.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_GAUSSIAN_REALIZER_H
26 #define UQ_GAUSSIAN_REALIZER_H
27 
28 #include <queso/VectorRealizer.h>
29 #include <queso/VectorSequence.h>
30 #include <queso/Environment.h>
31 #include <math.h>
32 
33 namespace QUESO {
34 
35 //*****************************************************
36 // Gaussian class [R-03]
37 //*****************************************************
44 template<class V, class M>
46 public:
47 
49 
50 
54  GaussianVectorRealizer(const char* prefix,
56  const V& lawExpVector, // vector of mean values
57  const M& lowerCholLawCovMatrix); // lower triangular matrix resulting from Cholesky decomposition of the covariance matrix
58 
60 
64  GaussianVectorRealizer(const char* prefix,
65  const VectorSet<V,M>& unifiedImageSet,
66  const V& lawExpVector, // vector of mean values
67  const M& matU,
68  const V& vecSsqrt,
69  const M& matVt);
73 
75 
76  const V& unifiedLawExpVector () const;
78 
80  const V& unifiedLawVarVector () const;
81 
83 
85  void realization (V& nextValues) const;
86 
88  void updateLawExpVector (const V& newLawExpVector);
89 
91 
94  void updateLowerCholLawCovMatrix(const M& newLowerCholLawCovMatrix);
95 
97 
100  void updateLowerCholLawCovMatrix(const M& matU,
101  const V& vecSsqrt,
102  const M& matVt);
104 
105 private:
109  M* m_matU;
112 
117 };
118 
119 } // End namespace QUESO
120 
121 #endif // UQ_GAUSSIAN_REALIZER_H
void realization(V &nextValues) const
Draws a realization.
A templated class for handling sets.
Definition: VectorSet.h:49
A templated (base) class for handling sampling from vector RVs.
const V & unifiedLawExpVector() const
Access to the vector of mean values and private attribute: m_unifiedLawExpVector. ...
void updateLawExpVector(const V &newLawExpVector)
Updates the mean with the new value newLawExpVector.
const V & unifiedLawVarVector() const
Access to the vector of variance values and private attribute: m_unifiedLawVarVector.
A class for handling sampling from Gaussian probability density distributions.
GaussianVectorRealizer(const char *prefix, const VectorSet< V, M > &unifiedImageSet, const V &lawExpVector, const M &lowerCholLawCovMatrix)
Constructor.
const VectorSet< V, M > & unifiedImageSet() const
Image set where the realizations lie. Access to protected attribute m_unifiedImageSet.
void updateLowerCholLawCovMatrix(const M &newLowerCholLawCovMatrix)
Updates the lower triangular matrix from Cholesky decomposition of the covariance matrix to the new v...

Generated on Thu Apr 23 2015 19:26:15 for queso-0.51.1 by  doxygen 1.8.5