queso-0.53.0
GaussianVectorCdf.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/GaussianVectorCdf.h>
26 
27 namespace QUESO {
28 
29 // Constructor -------------------------------------
30 template<class V,class M>
32  const char* prefix,
33  const VectorSet<V,M>& pdfSupport,
34  const V& domainExpectedValues,
35  const V& domainVarianceValues)
36  :
37  BaseVectorCdf<V,M>(prefix,pdfSupport),
38  m_covMatrix (m_pdfSupport.newDiagMatrix(domainVarianceValues*domainVarianceValues))
39 {
40  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
41  *m_env.subDisplayFile() << "Entering GaussianVectorCdf<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 GaussianVectorCdf<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>& pdfSupport,
59  const V& domainExpectedValues,
60  const M& covMatrix)
61  :
62  BaseVectorCdf<V,M>(prefix,pdfSupport),
63  m_covMatrix (new M(covMatrix))
64 {
65  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
66  *m_env.subDisplayFile() << "Entering GaussianVectorCdf<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 GaussianVectorCdf<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& cdfVec) const
91 {
92  queso_error_msg("incomplete code");
93  return;
94 }
95 // I/O method --------------------------------------
96 template <class V, class M>
97 void
98 GaussianVectorCdf<V,M>::print(std::ostream& os) const
99 {
100  return;
101 }
102 
103 // Protected member function------------------------
104 template<class V,class M>
105 void
107 {
108  queso_error_msg("incomplete code");
109  return;
110 }
111 
112 } // End namespace QUESO
unsigned int displayVerbosity() const
Definition: Environment.C:396
GaussianVectorCdf(const char *prefix, const VectorSet< V, M > &pdfSupport, const V &domainExpectedValues, const V &domainVarianceValues)
TODO: Constructor.
A templated class for handling sets.
Definition: VectorSet.h:52
A templated (base) class for handling CDFs of vector functions.
Definition: VectorCdf.h:53
#define queso_error_msg(msg)
Definition: asserts.h:47
std::string m_prefix
Definition: VectorCdf.h:99
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
void commonConstructor()
A common constructor to be used both class constructors.
void values(const V &paramValues, V &cdfVec) const
TODO: Returns the values of the vector CDF at each element of paramValues.
const BaseEnvironment & m_env
Definition: VectorCdf.h:98
void print(std::ostream &os) const
TODO: Prints the vector CDF.

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