queso-0.52.0
MonteCarloSGOptions.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_MOC_SG_OPTIONS_H
26 #define UQ_MOC_SG_OPTIONS_H
27 
28 #include <queso/Environment.h>
29 #include <queso/SequenceStatisticalOptions.h>
30 
31 #define UQ_MOC_SG_FILENAME_FOR_NO_FILE "."
32 
33 // _ODV = option default value
34 #define UQ_MOC_SG_DATA_OUTPUT_FILE_NAME_ODV UQ_MOC_SG_FILENAME_FOR_NO_FILE
35 #define UQ_MOC_SG_DATA_OUTPUT_ALLOWED_SET_ODV ""
36 
37 #define UQ_MOC_SG_PSEQ_DATA_OUTPUT_PERIOD_ODV 0
38 #define UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_NAME_ODV UQ_MOC_SG_FILENAME_FOR_NO_FILE
39 #define UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
40 #define UQ_MOC_SG_PSEQ_DATA_OUTPUT_ALLOWED_SET_ODV ""
41 #define UQ_MOC_SG_PSEQ_COMPUTE_STATS_ODV 0
42 
43 #define UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_NAME_ODV UQ_MOC_SG_FILENAME_FOR_NO_FILE
44 #define UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
45 #define UQ_MOC_SG_QSEQ_SIZE_ODV 100
46 #define UQ_MOC_SG_QSEQ_DISPLAY_PERIOD_ODV 500
47 #define UQ_MOC_SG_QSEQ_MEASURE_RUN_TIMES_ODV 0
48 #define UQ_MOC_SG_QSEQ_DATA_OUTPUT_PERIOD_ODV 0
49 #define UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_NAME_ODV UQ_MOC_SG_FILENAME_FOR_NO_FILE
50 #define UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
51 #define UQ_MOC_SG_QSEQ_DATA_OUTPUT_ALLOWED_SET_ODV ""
52 #define UQ_MOC_SG_QSEQ_COMPUTE_STATS_ODV 0
53 
54 namespace QUESO {
55 
67 {
68 public:
70 
71 
72 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
73  McOptionsValues (const SsOptionsValues* alternativePSsOptionsValues,
74  const SsOptionsValues* alternativeQSsOptionsValues);
75 #else
76 
78  McOptionsValues ();
79 #endif
80 
82  McOptionsValues (const McOptionsValues& src);
83 
87 
89 
93 
94  std::string m_dataOutputFileName;
95  std::set<unsigned int> m_dataOutputAllowedSet;
96 
97  unsigned int m_pseqDataOutputPeriod;
100  std::set<unsigned int> m_pseqDataOutputAllowedSet;
101 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
102  bool m_pseqComputeStats;
103 #endif
104 
107  unsigned int m_qseqSize;
108  unsigned int m_qseqDisplayPeriod;
113  std::set<unsigned int> m_qseqDataOutputAllowedSet;
114 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
115  bool m_qseqComputeStats;
116 #endif
117 
118 private:
120  void copy(const McOptionsValues& src);
121 
122 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
123  friend class MonteCarloSGOptions;
124  SsOptionsValues m_alternativePSsOptionsValues;
125  SsOptionsValues m_alternativeQSsOptionsValues;
126 #endif
127 };
128 
129 // --------------------------------------------------
130 // --------------------------------------------------
131 // --------------------------------------------------
132 
142 {
143 public:
144 
146 
147  MonteCarloSGOptions(const BaseEnvironment& env, const char* prefix);
149 
151 
153  MonteCarloSGOptions(const BaseEnvironment& env, const char* prefix, const McOptionsValues& alternativeOptionsValues);
154 
158 
160 
161  void scanOptionsValues();
163 
165  void print (std::ostream& os) const;
167 
169 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
170  SequenceStatisticalOptions* m_pseqStatisticalOptionsObj;
171  SequenceStatisticalOptions* m_qseqStatisticalOptionsObj;
172 #endif
173  std::string m_prefix;
174 
175 private:
177  void defineMyOptions (po::options_description& optionsDesc) const;
178 
180  void getMyOptionValues(po::options_description& optionsDesc);
181 
183  po::options_description* m_optionsDesc;
184 
185  std::string m_option_help;
188 
193 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
194  std::string m_option_pseq_computeStats;
195 #endif
196 
199  std::string m_option_qseq_size;
206 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
207  std::string m_option_qseq_computeStats;
208 #endif
209 };
210 
212 std::ostream& operator<<(std::ostream& os, const MonteCarloSGOptions& obj);
213 
214 } // End namespace QUESO
215 
216 #endif // UQ_MOC_SG_OPTIONS_H
std::string m_option_qseq_dataOutputAllowedSet
std::string m_option_pseq_dataOutputAllowedSet
void copy(const McOptionsValues &src)
Copies the option values from src to this.
unsigned int m_pseqDataOutputPeriod
void scanOptionsValues()
It scans the option values from the options input file.
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
This class provides options for the Monte Carlo sequence generator if no input file is available...
McOptionsValues()
Default constructor.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:187
std::set< unsigned int > m_dataOutputAllowedSet
const BaseEnvironment & m_env
std::string m_pseqDataOutputFileName
void print(std::ostream &os) const
It prints the option values.
std::string m_pseqDataOutputFileType
void defineMyOptions(po::options_description &optionsDesc) const
Defines the options for the Monte Carlo sequence generator as the default options.
po::options_description * m_optionsDesc
McOptionsValues & operator=(const McOptionsValues &rhs)
Assignment operator; it copies rhs to this.
void getMyOptionValues(po::options_description &optionsDesc)
Gets the sequence options.
MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file.
std::set< unsigned int > m_qseqDataOutputAllowedSet
This class reads the options for the Monte Carlo sequence generator from an input file...
std::set< unsigned int > m_pseqDataOutputAllowedSet

Generated on Thu Apr 23 2015 19:30:54 for queso-0.52.0 by  doxygen 1.8.5