queso-0.53.0
GaussianVectorMdf.C
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 #include <queso/GaussianVectorMdf.h>
26 
27 namespace QUESO {
28 
29 // Constructor -------------------------------------
30 template<class V,class M>
32  const char* prefix,
33  const VectorSet<V,M>& domainSet,
34  const V& domainExpectedValues,
35  const V& domainVarianceValues)
36  :
37  BaseVectorMdf<V,M>(prefix,domainSet),
38  m_covMatrix (m_domainSet.newDiagMatrix(domainVarianceValues*domainVarianceValues))
39 {
40  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
41  *m_env.subDisplayFile() << "Entering GaussianVectorMdf<V,M>::constructor() [1]"
42  << ": prefix = " << m_prefix
43  << std::endl;
44  }
45 
47 
48  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
49  *m_env.subDisplayFile() << "Leaving GaussianVectorMdf<V,M>::constructor() [1]"
50  << ": prefix = " << m_prefix
51  << std::endl;
52  }
53 }
54 // Constructor -------------------------------------
55 template<class V,class M>
57  const char* prefix,
58  const VectorSet<V,M>& domainSet,
59  const V& domainExpectedValues,
60  const M& covMatrix)
61  :
62  BaseVectorMdf<V,M>(prefix,domainSet),
63  m_covMatrix (new M(covMatrix))
64 {
65  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
66  *m_env.subDisplayFile() << "Entering GaussianVectorMdf<V,M>::constructor() [2]"
67  << ": prefix = " << m_prefix
68  << std::endl;
69  }
70 
72 
73  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
74  *m_env.subDisplayFile() << "Leaving GaussianVectorMdf<V,M>::constructor() [2]"
75  << ": prefix = " << m_prefix
76  << std::endl;
77  }
78 }
79 // Destructor -------------------------------------
80 template<class V,class M>
82 {
83  delete m_covMatrix;
84 }
85 // Math method -------------------------------------
86 template<class V, class M>
87 void
89  const V& paramValues,
90  V& mdfVec) const
91 {
92  queso_error_msg("incomplete code");
93  return;
94 }
95 // I/O method --------------------------------------
96 template <class V, class M>
97 void
98 GaussianVectorMdf<V,M>::print(std::ostream& os) const
99 {
100  return;
101 }
102 // Protected member function------------------------
103 template<class V,class M>
104 void
106 {
107  queso_error_msg("incomplete code");
108  return;
109 }
110 
111 } // End namespace QUESO
unsigned int displayVerbosity() const
Definition: Environment.C:396
A templated class for handling sets.
Definition: VectorSet.h:52
void print(std::ostream &os) const
TODO: Prints the vector CDF.
std::string m_prefix
Definition: VectorMdf.h:83
#define queso_error_msg(msg)
Definition: asserts.h:47
void values(const V &paramValues, V &mdfVec) const
TODO: Returns the values of the vector CDF at each element of paramValues.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
GaussianVectorMdf(const char *prefix, const VectorSet< V, M > &domainSet, const V &domainExpectedValues, const V &domainVarianceValues)
TODO: Constructor.
A templated (base) class for handling MDFs of vector functions.
Definition: VectorMdf.h:52
~GaussianVectorMdf()
Destructor.
const BaseEnvironment & m_env
Definition: VectorMdf.h:82

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