queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
StatisticalForwardProblem.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_SFP_H
26 #define UQ_SFP_H
27 
28 #include <queso/StatisticalForwardProblemOptions.h>
29 #include <queso/VectorFunction.h>
30 #include <queso/MonteCarloSG.h>
31 #include <queso/VectorRV.h>
32 #include <queso/GenericVectorRV.h>
33 #include <queso/SequenceOfVectors.h>
34 
35 namespace QUESO {
36 
37 class GslVector;
38 class GslMatrix;
39 
79 template <class P_V = GslVector, class P_M = GslMatrix, class Q_V = GslVector, class Q_M = GslMatrix>
81 {
82 public:
84 
85 
93  StatisticalForwardProblem(const char* prefix,
94  const SfpOptionsValues* alternativeOptionsValues, // dakota
95  const BaseVectorRV <P_V,P_M>& paramRv,
96  const BaseVectorFunction<P_V,P_M,Q_V,Q_M>& qoiFunction,
98 
102 
104 
105  bool computeSolutionFlag() const;
107 
109 
121 //<item> computes the CDFs of the components of 'm_qoiRv' as instances of 'SampledVectorCdf<Q_V,Q_M>'
122  void solveWithMonteCarlo(const McOptionsValues* alternativeOptionsValues); // dakota
123 
125  const GenericVectorRV<Q_V,Q_M>& qoiRv () const;
126 
129 
130 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
131 
132  //<item> CDFs of QoI components through the operation 'qoiRv().unifiedCdf()',
133  // which returns an instance of the class 'BaseVectorCdf<Q_V,Q_M>'
135 
136 #endif
137 
138 
140 
141 
143  void print(std::ostream& os) const;
144  friend std::ostream& operator<<(std::ostream& os,
146  obj.print(os);
147  return os;
148  }
150 
151 private:
153 
154  void commonConstructor();
155 
157 
160  GenericVectorRV <Q_V,Q_M>& m_qoiRv; // FIX ME: Maybe not always generic ?
161 
165 
167 
169 
171 
172 #ifdef UQ_ALSO_COMPUTE_MDFS_WITHOUT_KDE
175 #endif
176 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
181 
185 #endif
186 
188 };
189 
190 } // End namespace QUESO
191 
192 #endif // UQ_SFP_H
BaseVectorCdf< Q_V, Q_M > * m_subSolutionCdf
ArrayOfOneDTables< Q_V, Q_M > * m_unifiedCdfValues
ArrayOfOneDTables< Q_V, Q_M > * m_subMdfValues
const GenericVectorRV< Q_V, Q_M > & qoiRv() const
Returns the QoI RV; access to private attribute m_qoiRv.
const BaseVectorRV< P_V, P_M > & m_paramRv
ArrayOfOneDGrids< Q_V, Q_M > * m_subMdfGrids
A templated (base) class for handling vector functions.
ArrayOfOneDTables< Q_V, Q_M > * m_subCdfValues
This class provides options for a Statistical Forward Problem if no input file is available...
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:198
This class provides options for the Monte Carlo sequence generator if no input file is available...
A templated class that implements a Monte Carlo generator of samples.
Definition: MonteCarloSG.h:52
This templated class represents a Statistical Forward Problem.
ArrayOfOneDGrids< Q_V, Q_M > * m_unifiedCdfGrids
BaseVectorCdf< Q_V, Q_M > * m_unifiedSolutionCdf
GenericVectorRV< Q_V, Q_M > & m_qoiRv
bool computeSolutionFlag() const
Whether or not compute the solution.
void solveWithMonteCarlo(const McOptionsValues *alternativeOptionsValues)
Solves the problem through Monte Carlo algorithm.
BaseVectorMdf< Q_V, Q_M > * m_subSolutionMdf
const BaseVectorCdf< Q_V, Q_M > & qoiRv_unifiedCdf() const
MonteCarloSG< P_V, P_M, Q_V, Q_M > * m_mcSeqGenerator
BaseJointPdf< Q_V, Q_M > * m_solutionPdf
BaseVectorRealizer< Q_V, Q_M > * m_solutionRealizer
void commonConstructor()
TODO: Common constructor.
BaseVectorSequence< Q_V, Q_M > * m_paramChain
friend std::ostream & operator<<(std::ostream &os, const StatisticalForwardProblem< P_V, P_M, Q_V, Q_M > &obj)
ArrayOfOneDGrids< Q_V, Q_M > * m_subCdfGrids
const BaseVectorSequence< Q_V, Q_M > & getParamChain() const
Returns the parameter chain; access to private attribute m_paramChain.
BaseVectorSequence< Q_V, Q_M > * m_qoiChain
const BaseVectorFunction< P_V, P_M, Q_V, Q_M > & m_qoiFunction
StatisticalForwardProblem(const char *prefix, const SfpOptionsValues *alternativeOptionsValues, const BaseVectorRV< P_V, P_M > &paramRv, const BaseVectorFunction< P_V, P_M, Q_V, Q_M > &qoiFunction, GenericVectorRV< Q_V, Q_M > &qoiRv)
Constructor.
void print(std::ostream &os) const
TODO: Prints the sequence.

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