queso-0.53.0
VectorCdf.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-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 #ifndef UQ_VECTOR_CUMULATIVE_DISTRIBUTION_FUNCTION_H
26 #define UQ_VECTOR_CUMULATIVE_DISTRIBUTION_FUNCTION_H
27 
28 #include <queso/ArrayOfOneDGrids.h>
29 #include <queso/ArrayOfOneDTables.h>
30 #include <queso/ScalarCdf.h>
31 #include <queso/SampledScalarCdf.h>
32 #include <queso/Environment.h>
33 #include <math.h>
34 
35 namespace QUESO {
36 
37 class GslVector;
38 class GslMatrix;
39 
52 template <class V = GslVector, class M = GslMatrix>
54 public:
56 
57 
60  BaseVectorCdf(const char* prefix,
61  const VectorSet<V,M>& pdfSupport);
62 
64  virtual ~BaseVectorCdf();
66 
68 
69  const VectorSet<V,M>& pdfSupport () const;
71 
73  virtual void values (const V& paramValues, V& cdfVec) const = 0;
74 
76  virtual const BaseScalarCdf<double>& cdf (unsigned int rowId) const = 0;
78 
80 
81  virtual void print (std::ostream& os) const = 0;
83  friend std::ostream& operator<< (std::ostream& os,
84  const BaseVectorCdf<V,M>& obj) {
85  obj.print(os);
86  return os;
87  }
88 
90 
91  virtual void subWriteContents(const std::string& varNamePrefix,
92  const std::string& fileName,
93  const std::string& fileType,
94  const std::set<unsigned int>& allowedSubEnvIds) const;
96 protected:
97 
99  std::string m_prefix;
101 };
102 
103 //---------------------------------------------------
104 // Method outside either class definition------------
105 //---------------------------------------------------
107 //
108 template <class V, class M>
109 void
111  const BaseVectorCdf<V,M>& cdf2,
112  const V& epsilonVec,
113  V& distances);
114 
115 } // End namespace QUESO
116 
117 #endif // UQ_VECTOR_CUMULATIVE_DISTRIBUTION_FUNCTION_H
A templated (base) class for handling CDFs.
Definition: ScalarCdf.h:49
const VectorSet< V, M > & pdfSupport() const
Returns the image set (support) of the PDF; access to protected attribute m_pdfSupport.
Definition: VectorCdf.C:59
A templated class for handling sets.
Definition: VectorSet.h:52
A templated (base) class for handling CDFs of vector functions.
Definition: VectorCdf.h:53
BaseVectorCdf(const char *prefix, const VectorSet< V, M > &pdfSupport)
Default constructor.
Definition: VectorCdf.C:31
std::string m_prefix
Definition: VectorCdf.h:99
virtual const BaseScalarCdf< double > & cdf(unsigned int rowId) const =0
virtual void subWriteContents(const std::string &varNamePrefix, const std::string &fileName, const std::string &fileType, const std::set< unsigned int > &allowedSubEnvIds) const
Writes the CDF of an allowed sub-environment to a file.
Definition: VectorCdf.C:66
virtual void values(const V &paramValues, V &cdfVec) const =0
Finds the value of the vector CDF at each element of paramValue, and saves it in cdfVec. See template specialization.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
friend std::ostream & operator<<(std::ostream &os, const BaseVectorCdf< V, M > &obj)
Definition: VectorCdf.h:83
const BaseEnvironment & m_env
Definition: VectorCdf.h:98
const VectorSet< V, M > & m_pdfSupport
Definition: VectorCdf.h:100
virtual void print(std::ostream &os) const =0
Prints the vector CDF. See template specialization.
void horizontalDistances(const BaseVectorCdf< V, M > &cdf1, const BaseVectorCdf< V, M > &cdf2, const V &epsilonVec, V &distances)
It calculated the maximum horizontal distances between two vector CDFs.
Definition: VectorCdf.C:89
virtual ~BaseVectorCdf()
Virtual destructor.
Definition: VectorCdf.C:53

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