queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
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-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_MOC_SG_OPTIONS_H
26 #define UQ_MOC_SG_OPTIONS_H
27 
28 #include <queso/Environment.h>
29 #include <queso/SequenceStatisticalOptions.h>
30 
31 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
32 #include <queso/BoostInputOptionsParser.h>
33 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
34 
35 #define UQ_MOC_SG_FILENAME_FOR_NO_FILE "."
36 
37 // _ODV = option default value
38 #define UQ_MOC_SG_HELP ""
39 #define UQ_MOC_SG_DATA_OUTPUT_FILE_NAME_ODV UQ_MOC_SG_FILENAME_FOR_NO_FILE
40 #define UQ_MOC_SG_DATA_OUTPUT_ALLOWED_SET_ODV ""
41 
42 #define UQ_MOC_SG_PSEQ_DATA_OUTPUT_PERIOD_ODV 0
43 #define UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_NAME_ODV UQ_MOC_SG_FILENAME_FOR_NO_FILE
44 #define UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
45 #define UQ_MOC_SG_PSEQ_DATA_OUTPUT_ALLOWED_SET_ODV ""
46 #define UQ_MOC_SG_PSEQ_COMPUTE_STATS_ODV 0
47 
48 #define UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_NAME_ODV UQ_MOC_SG_FILENAME_FOR_NO_FILE
49 #define UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
50 #define UQ_MOC_SG_QSEQ_SIZE_ODV 100
51 #define UQ_MOC_SG_QSEQ_DISPLAY_PERIOD_ODV 500
52 #define UQ_MOC_SG_QSEQ_MEASURE_RUN_TIMES_ODV 0
53 #define UQ_MOC_SG_QSEQ_DATA_OUTPUT_PERIOD_ODV 0
54 #define UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_NAME_ODV UQ_MOC_SG_FILENAME_FOR_NO_FILE
55 #define UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
56 #define UQ_MOC_SG_QSEQ_DATA_OUTPUT_ALLOWED_SET_ODV ""
57 #define UQ_MOC_SG_QSEQ_COMPUTE_STATS_ODV 0
58 
59 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
60 namespace boost {
61  namespace program_options {
62  class options_description;
63  }
64 }
65 #endif
66 
67 namespace QUESO {
68 
80 {
81 public:
83 
84 
85 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
86  McOptionsValues (const SsOptionsValues* alternativePSsOptionsValues,
87  const SsOptionsValues* alternativeQSsOptionsValues);
88  McOptionsValues (const SsOptionsValues* alternativePSsOptionsValues,
89  const SsOptionsValues* alternativeQSsOptionsValues,
90  const BaseEnvironment * env, const char * prefix);
91 #else
92 
94  McOptionsValues ();
95 
97  McOptionsValues(const BaseEnvironment * env, const char * prefix);
98 #endif
99 
101  McOptionsValues (const McOptionsValues& src);
102 
104  virtual ~McOptionsValues ();
106 
108 
112 
113  std::string m_prefix;
114 
116  std::string m_help;
117 
118  std::string m_dataOutputFileName;
119  std::set<unsigned int> m_dataOutputAllowedSet;
120 
124  std::set<unsigned int> m_pseqDataOutputAllowedSet;
125 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
127 #endif
128 
131  unsigned int m_qseqSize;
132  unsigned int m_qseqDisplayPeriod;
137  std::set<unsigned int> m_qseqDataOutputAllowedSet;
138 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
140 #endif
141 
142 private:
143 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
145 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
146 
147  std::string m_option_help;
150 
155 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
157 #endif
158 
161  std::string m_option_qseq_size;
168 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
170 #endif
171 
173  void copy(const McOptionsValues& src);
174 
175  void checkOptions();
176 
177  friend std::ostream & operator<<(std::ostream & os,
178  const McOptionsValues & obj);
179 
180 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
181  friend class MonteCarloSGOptions;
184 #endif
185 };
186 
187 // --------------------------------------------------
188 // --------------------------------------------------
189 // --------------------------------------------------
190 
200 {
201 public:
202 
204 
205  MonteCarloSGOptions(const BaseEnvironment& env, const char* prefix);
207 
209 
211  MonteCarloSGOptions(const BaseEnvironment& env, const char* prefix, const McOptionsValues& alternativeOptionsValues);
212 
216 
218 
219  void scanOptionsValues();
221 
223  void print (std::ostream& os) const;
225 
227 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
230 #endif
231  std::string m_prefix;
232 
233 private:
234 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
235  void defineMyOptions (boost::program_options::options_description& optionsDesc) const;
237 
239  void getMyOptionValues(boost::program_options::options_description& optionsDesc);
240 #endif
241 
243 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
244  boost::program_options::options_description* m_optionsDesc;
245 #endif
246 
247  std::string m_option_help;
250 
255 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
257 #endif
258 
261  std::string m_option_qseq_size;
268 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
270 #endif
271 };
272 
274 std::ostream& operator<<(std::ostream& os, const MonteCarloSGOptions& obj);
275 
276 } // End namespace QUESO
277 
278 #endif // UQ_MOC_SG_OPTIONS_H
std::string m_option_pseq_dataOutputFileName
std::string m_option_pseq_computeStats
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
Defines the options for the Monte Carlo sequence generator as the default options.
std::set< unsigned int > m_qseqDataOutputAllowedSet
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:198
std::string m_option_qseq_dataInputFileType
A templated class that stores statistical options (optionally read from an input file) ...
This class provides options for the Monte Carlo sequence generator if no input file is available...
std::string m_option_pseq_dataOutputFileType
std::string m_option_qseq_dataOutputAllowedSet
SequenceStatisticalOptions * m_pseqStatisticalOptionsObj
std::ostream & operator<<(std::ostream &os, const SequenceStatisticalOptions &obj)
std::string m_option_dataOutputAllowedSet
std::string m_option_qseq_displayPeriod
std::string m_option_qseq_dataOutputFileName
std::set< unsigned int > m_pseqDataOutputAllowedSet
void scanOptionsValues()
It scans the option values from the options input file.
BoostInputOptionsParser * m_parser
std::string m_option_qseq_measureRunTimes
McOptionsValues & operator=(const McOptionsValues &rhs)
Assignment operator; it copies rhs to this.
McOptionsValues()
Default constructor.
SsOptionsValues m_alternativeQSsOptionsValues
std::string m_option_pseq_dataOutputAllowedSet
SsOptionsValues m_alternativePSsOptionsValues
std::string m_option_dataOutputFileName
std::string m_option_qseq_dataInputFileName
const BaseEnvironment & m_env
std::set< unsigned int > m_dataOutputAllowedSet
std::string m_help
If non-empty string, print options and values to output file.
void print(std::ostream &os) const
It prints the option values.
std::string m_option_pseq_dataOutputPeriod
std::string m_option_qseq_dataOutputPeriod
void copy(const McOptionsValues &src)
Copies the option values from src to this.
std::string m_option_qseq_dataOutputFileType
boost::program_options::options_description * m_optionsDesc
SequenceStatisticalOptions * m_qseqStatisticalOptionsObj
std::string m_option_pseq_dataOutputAllowedSet
std::string m_option_qseq_dataOutputAllowedSet
MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file.
virtual ~McOptionsValues()
Destructor.
std::string m_option_qseq_computeStats
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Gets the sequence options.
friend std::ostream & operator<<(std::ostream &os, const McOptionsValues &obj)
This class reads the options for the Monte Carlo sequence generator from an input file...
A templated class that stores default statistical options for a sequence of vectors, e.g. a Markov chain, a Monte Carlo input sequence, or a Monte Carlo output sequence.

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