queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
MonteCarloSGOptions.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-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 #include <queso/Defines.h>
26 
27 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
28 #include <boost/program_options.hpp>
29 #else
30 #include <queso/getpot.h>
31 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
32 
33 #include <queso/MonteCarloSGOptions.h>
34 #include <queso/Miscellaneous.h>
35 
36 // -------------------------------------------------
37 // McOptionsValues --------------------------
38 // -------------------------------------------------
39 
40 namespace QUESO {
41 
42 // Default constructor -----------------------------
44 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
45  const SsOptionsValues* alternativePSsOptionsValues,
46  const SsOptionsValues* alternativeQSsOptionsValues
47 #endif
48  )
49  :
50  m_prefix ("mc_"),
51  m_help (UQ_MOC_SG_HELP),
52  m_dataOutputFileName (UQ_MOC_SG_DATA_OUTPUT_FILE_NAME_ODV ),
53  //m_dataOutputAllowedSet (),
54  m_pseqDataOutputPeriod (UQ_MOC_SG_PSEQ_DATA_OUTPUT_PERIOD_ODV ),
55  m_pseqDataOutputFileName (UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_NAME_ODV),
56  m_pseqDataOutputFileType (UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_TYPE_ODV),
57  //m_pseqDataOutputAllowedSet (),
58 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
59  m_pseqComputeStats (UQ_MOC_SG_PSEQ_COMPUTE_STATS_ODV ),
60 #endif
61  m_qseqDataInputFileName (UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_NAME_ODV ),
62  m_qseqDataInputFileType (UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_TYPE_ODV ),
63  m_qseqSize (UQ_MOC_SG_QSEQ_SIZE_ODV ),
64  m_qseqDisplayPeriod (UQ_MOC_SG_QSEQ_DISPLAY_PERIOD_ODV ),
65  m_qseqMeasureRunTimes (UQ_MOC_SG_QSEQ_MEASURE_RUN_TIMES_ODV ),
66  m_qseqDataOutputPeriod (UQ_MOC_SG_QSEQ_DATA_OUTPUT_PERIOD_ODV ),
67  m_qseqDataOutputFileName (UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_NAME_ODV),
68  m_qseqDataOutputFileType (UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_TYPE_ODV),
69  //m_qseqDataOutputAllowedSet (),
70 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
71  m_qseqComputeStats (UQ_MOC_SG_QSEQ_COMPUTE_STATS_ODV ),
72  m_alternativePSsOptionsValues(),
73  m_alternativeQSsOptionsValues(),
74 #endif
75 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
76  m_parser(NULL),
77 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
78  m_option_help (m_prefix + "help" ),
79  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
80  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
81  m_option_pseq_dataOutputPeriod (m_prefix + "pseq_dataOutputPeriod" ),
82  m_option_pseq_dataOutputFileName (m_prefix + "pseq_dataOutputFileName" ),
83  m_option_pseq_dataOutputFileType (m_prefix + "pseq_dataOutputFileType" ),
84  m_option_pseq_dataOutputAllowedSet(m_prefix + "pseq_dataOutputAllowedSet" ),
85 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
86  m_option_pseq_computeStats (m_prefix + "pseq_computeStats" ),
87 #endif
88  m_option_qseq_dataInputFileName (m_prefix + "qseq_dataInputFileName" ),
89  m_option_qseq_dataInputFileType (m_prefix + "qseq_dataInputFileType" ),
90  m_option_qseq_size (m_prefix + "qseq_size" ),
91  m_option_qseq_displayPeriod (m_prefix + "qseq_displayPeriod" ),
92  m_option_qseq_measureRunTimes (m_prefix + "qseq_measureRunTimes" ),
93  m_option_qseq_dataOutputPeriod (m_prefix + "qseq_dataOutputPeriod" ),
94  m_option_qseq_dataOutputFileName (m_prefix + "qseq_dataOutputFileName" ),
95  m_option_qseq_dataOutputFileType (m_prefix + "qseq_dataOutputFileType" ),
96  m_option_qseq_dataOutputAllowedSet(m_prefix + "qseq_dataOutputAllowedSet" )
97 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
98  ,
99  m_option_qseq_computeStats (m_prefix + "qseq_computeStats" )
100 #endif
101 {
102 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
103  if (alternativePSsOptionsValues) m_alternativePSsOptionsValues = *alternativePSsOptionsValues;
104  if (alternativeQSsOptionsValues) m_alternativeQSsOptionsValues = *alternativeQSsOptionsValues;
105 #endif
106 }
107 
109 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
110  const SsOptionsValues* alternativePSsOptionsValues,
111  const SsOptionsValues* alternativeQSsOptionsValues,
112 #endif
113  const BaseEnvironment * env, const char * prefix
114  )
115  :
116  m_prefix ((std::string)(prefix) + "mc_"),
117  m_help (UQ_MOC_SG_HELP),
118  m_dataOutputFileName (UQ_MOC_SG_DATA_OUTPUT_FILE_NAME_ODV ),
119  //m_dataOutputAllowedSet (),
120  m_pseqDataOutputPeriod (UQ_MOC_SG_PSEQ_DATA_OUTPUT_PERIOD_ODV ),
121  m_pseqDataOutputFileName (UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_NAME_ODV),
122  m_pseqDataOutputFileType (UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_TYPE_ODV),
123  //m_pseqDataOutputAllowedSet (),
124 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
125  m_pseqComputeStats (UQ_MOC_SG_PSEQ_COMPUTE_STATS_ODV ),
126 #endif
127  m_qseqDataInputFileName (UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_NAME_ODV ),
128  m_qseqDataInputFileType (UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_TYPE_ODV ),
129  m_qseqSize (UQ_MOC_SG_QSEQ_SIZE_ODV ),
130  m_qseqDisplayPeriod (UQ_MOC_SG_QSEQ_DISPLAY_PERIOD_ODV ),
131  m_qseqMeasureRunTimes (UQ_MOC_SG_QSEQ_MEASURE_RUN_TIMES_ODV ),
132  m_qseqDataOutputPeriod (UQ_MOC_SG_QSEQ_DATA_OUTPUT_PERIOD_ODV ),
133  m_qseqDataOutputFileName (UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_NAME_ODV),
134  m_qseqDataOutputFileType (UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_TYPE_ODV),
135  //m_qseqDataOutputAllowedSet (),
136 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
137  m_qseqComputeStats (UQ_MOC_SG_QSEQ_COMPUTE_STATS_ODV ),
138  m_alternativePSsOptionsValues(),
139  m_alternativeQSsOptionsValues(),
140 #endif
141 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
142  m_parser(new BoostInputOptionsParser(env->optionsInputFileName())),
143 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
144  m_option_help (m_prefix + "help" ),
145  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
146  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
147  m_option_pseq_dataOutputPeriod (m_prefix + "pseq_dataOutputPeriod" ),
148  m_option_pseq_dataOutputFileName (m_prefix + "pseq_dataOutputFileName" ),
149  m_option_pseq_dataOutputFileType (m_prefix + "pseq_dataOutputFileType" ),
150  m_option_pseq_dataOutputAllowedSet(m_prefix + "pseq_dataOutputAllowedSet" ),
151 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
152  m_option_pseq_computeStats (m_prefix + "pseq_computeStats" ),
153 #endif
154  m_option_qseq_dataInputFileName (m_prefix + "qseq_dataInputFileName" ),
155  m_option_qseq_dataInputFileType (m_prefix + "qseq_dataInputFileType" ),
156  m_option_qseq_size (m_prefix + "qseq_size" ),
157  m_option_qseq_displayPeriod (m_prefix + "qseq_displayPeriod" ),
158  m_option_qseq_measureRunTimes (m_prefix + "qseq_measureRunTimes" ),
159  m_option_qseq_dataOutputPeriod (m_prefix + "qseq_dataOutputPeriod" ),
160  m_option_qseq_dataOutputFileName (m_prefix + "qseq_dataOutputFileName" ),
161  m_option_qseq_dataOutputFileType (m_prefix + "qseq_dataOutputFileType" ),
162  m_option_qseq_dataOutputAllowedSet(m_prefix + "qseq_dataOutputAllowedSet" )
163 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
164  ,
165  m_option_qseq_computeStats (m_prefix + "qseq_computeStats" )
166 #endif
167 {
168 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
169  if (alternativePSsOptionsValues) m_alternativePSsOptionsValues = *alternativePSsOptionsValues;
170  if (alternativeQSsOptionsValues) m_alternativeQSsOptionsValues = *alternativeQSsOptionsValues;
171 #endif
172 
173 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
174  m_parser->registerOption<std::string >(m_option_help, UQ_MOC_SG_HELP , "produce help message for Monte Carlo distribution calculator");
175  m_parser->registerOption<std::string >(m_option_dataOutputFileName, UQ_MOC_SG_DATA_OUTPUT_FILE_NAME_ODV , "name of generic data output file" );
176  m_parser->registerOption<std::string >(m_option_dataOutputAllowedSet, UQ_MOC_SG_DATA_OUTPUT_ALLOWED_SET_ODV , "subEnvs that will write to generic data output file" );
177  m_parser->registerOption<unsigned int>(m_option_pseq_dataOutputPeriod, UQ_MOC_SG_PSEQ_DATA_OUTPUT_PERIOD_ODV , "period of message display during param sequence generation" );
178  m_parser->registerOption<std::string >(m_option_pseq_dataOutputFileName, UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_NAME_ODV , "name of data output file for parameters" );
179  m_parser->registerOption<std::string >(m_option_pseq_dataOutputFileType, UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_TYPE_ODV , "type of data output file for parameters" );
180  m_parser->registerOption<std::string >(m_option_pseq_dataOutputAllowedSet, UQ_MOC_SG_PSEQ_DATA_OUTPUT_ALLOWED_SET_ODV, "subEnvs that will write to data output file for parameters" );
181 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
182  m_parser->registerOption<bool >(m_option_pseq_computeStats, UQ_MOC_SG_PSEQ_COMPUTE_STATS_ODV , "compute statistics on sequence of parameter" );
183 #endif
184  m_parser->registerOption<std::string >(m_option_qseq_dataInputFileName, UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_NAME_ODV , "name of data input file for qois" );
185  m_parser->registerOption<std::string >(m_option_qseq_dataInputFileType, UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_TYPE_ODV , "type of data input file for qois" );
186  m_parser->registerOption<unsigned int>(m_option_qseq_size, UQ_MOC_SG_QSEQ_SIZE_ODV , "size of qoi sequence" );
187  m_parser->registerOption<unsigned int>(m_option_qseq_displayPeriod, UQ_MOC_SG_QSEQ_DISPLAY_PERIOD_ODV , "period of message display during qoi sequence generation" );
188  m_parser->registerOption<bool >(m_option_qseq_measureRunTimes, UQ_MOC_SG_QSEQ_MEASURE_RUN_TIMES_ODV , "measure run times" );
189  m_parser->registerOption<unsigned int>(m_option_qseq_dataOutputPeriod, UQ_MOC_SG_QSEQ_DATA_OUTPUT_PERIOD_ODV , "period of message display during qoi sequence generation" );
190  m_parser->registerOption<std::string >(m_option_qseq_dataOutputFileName, UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_NAME_ODV , "name of data output file for qois" );
191  m_parser->registerOption<std::string >(m_option_qseq_dataOutputFileType, UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_TYPE_ODV , "type of data output file for qois" );
192  m_parser->registerOption<std::string >(m_option_qseq_dataOutputAllowedSet, UQ_MOC_SG_QSEQ_DATA_OUTPUT_ALLOWED_SET_ODV, "subEnvs that will write to data output file for qois" );
193 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
194  m_parser->registerOption<bool >(m_option_qseq_computeStats, UQ_MOC_SG_QSEQ_COMPUTE_STATS_ODV , "compute statistics on sequence of qoi" );
195 #endif
196 
197  m_parser->scanInputFile();
198 
199  m_parser->getOption<std::string >(m_option_help, m_help);
200  m_parser->getOption<std::string >(m_option_dataOutputFileName, m_dataOutputFileName);
201  m_parser->getOption<std::set<unsigned int> >(m_option_dataOutputAllowedSet, m_dataOutputAllowedSet);
202  m_parser->getOption<unsigned int>(m_option_pseq_dataOutputPeriod, m_pseqDataOutputPeriod);
203  m_parser->getOption<std::string >(m_option_pseq_dataOutputFileName, m_pseqDataOutputFileName);
204  m_parser->getOption<std::string >(m_option_pseq_dataOutputFileType, m_pseqDataOutputFileType);
205  m_parser->getOption<std::set<unsigned int> >(m_option_pseq_dataOutputAllowedSet, m_pseqDataOutputAllowedSet);
206 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
207  m_parser->getOption<bool >(m_option_pseq_computeStats, m_pseq_computeStats);
208 #endif
209  m_parser->getOption<std::string >(m_option_qseq_dataInputFileName, m_qseqDataInputFileName);
210  m_parser->getOption<std::string >(m_option_qseq_dataInputFileType, m_qseqDataInputFileType);
211  m_parser->getOption<unsigned int>(m_option_qseq_size, m_qseqSize);
212  m_parser->getOption<unsigned int>(m_option_qseq_displayPeriod, m_qseqDisplayPeriod);
213  m_parser->getOption<bool >(m_option_qseq_measureRunTimes, m_qseqMeasureRunTimes);
214  m_parser->getOption<unsigned int>(m_option_qseq_dataOutputPeriod, m_qseqDataOutputPeriod);
215  m_parser->getOption<std::string >(m_option_qseq_dataOutputFileName, m_qseqDataOutputFileName);
216  m_parser->getOption<std::string >(m_option_qseq_dataOutputFileType, m_qseqDataOutputFileType);
217  m_parser->getOption<std::set<unsigned int> >(m_option_qseq_dataOutputAllowedSet, m_qseqDataOutputAllowedSet);
218 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
219  m_parser->getOption<bool >(m_option_qseq_computeStats, m_qseq_computeStats);
220 #endif
221 #else
222  m_help = env->input()(m_option_help, UQ_MOC_SG_HELP);
223  m_dataOutputFileName = env->input()(m_option_dataOutputFileName, UQ_MOC_SG_DATA_OUTPUT_FILE_NAME_ODV);
224 
225  // UQ_MOC_SG_DATA_OUTPUT_ALLOWED_SET_ODV is the empty set (string) by default
226  unsigned int size = env->input().vector_variable_size(m_option_dataOutputAllowedSet);
227  for (unsigned int i = 0; i < size; i++) {
228  // We default to empty set, so the default values are actually never
229  // used here
230  unsigned int allowed = env->input()(m_option_dataOutputAllowedSet, i, i);
231  m_dataOutputAllowedSet.insert(allowed);
232  }
233 
234  m_pseqDataOutputPeriod = env->input()(m_option_pseq_dataOutputPeriod, UQ_MOC_SG_PSEQ_DATA_OUTPUT_PERIOD_ODV);
235  m_pseqDataOutputFileName = env->input()(m_option_pseq_dataOutputFileName, UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_NAME_ODV);
236  m_pseqDataOutputFileType = env->input()(m_option_pseq_dataOutputFileType, UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_TYPE_ODV);
237 
238  // UQ_MOC_SG_PSEQ_DATA_OUTPUT_ALLOWED_SET_ODV is the empty set (string) by default
239  size = env->input().vector_variable_size(m_option_pseq_dataOutputAllowedSet);
240  for (unsigned int i = 0; i < size; i++) {
241  // We default to empty set, so the default values are actually never
242  // used here
243  unsigned int allowed = env->input()(m_option_pseq_dataOutputAllowedSet, i, i);
244  m_pseqDataOutputAllowedSet.insert(allowed);
245  }
246 
247 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
248  m_pseq_computeStats = env->input()(m_option_pseq_computeStats, UQ_MOC_SG_PSEQ_COMPUTE_STATS_ODV);
249 #endif
250  m_qseqDataInputFileName = env->input()(m_option_qseq_dataInputFileName, UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_NAME_ODV);
251  m_qseqDataInputFileType = env->input()(m_option_qseq_dataInputFileType, UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_TYPE_ODV);
252  m_qseqSize = env->input()(m_option_qseq_size, UQ_MOC_SG_QSEQ_SIZE_ODV);
253  m_qseqDisplayPeriod = env->input()(m_option_qseq_displayPeriod, UQ_MOC_SG_QSEQ_DISPLAY_PERIOD_ODV);
254  m_qseqMeasureRunTimes = env->input()(m_option_qseq_measureRunTimes, UQ_MOC_SG_QSEQ_MEASURE_RUN_TIMES_ODV);
255  m_qseqDataOutputPeriod = env->input()(m_option_qseq_dataOutputPeriod, UQ_MOC_SG_QSEQ_DATA_OUTPUT_PERIOD_ODV);
256  m_qseqDataOutputFileName = env->input()(m_option_qseq_dataOutputFileName, UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_NAME_ODV);
257  m_qseqDataOutputFileType = env->input()(m_option_qseq_dataOutputFileType, UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_TYPE_ODV);
258 
259  // UQ_MOC_SG_QSEQ_DATA_OUTPUT_ALLOWED_SET_ODV is the empty set (string) by default
260  size = env->input().vector_variable_size(m_option_qseq_dataOutputAllowedSet);
261  for (unsigned int i = 0; i < size; i++) {
262  // We default to empty set, so the default values are actually never
263  // used here
264  unsigned int allowed = env->input()(m_option_qseq_dataOutputAllowedSet, i, i);
265  m_qseqDataOutputAllowedSet.insert(allowed);
266  }
267 
268 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
269  m_qseq_computeStats = env->input()(m_option_qseq_computeStats, UQ_MOC_SG_QSEQ_COMPUTE_STATS_ODV);
270 #endif
271 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
272 }
273 
274 // Copy constructor --------------------------------
275 McOptionsValues::McOptionsValues(const McOptionsValues& src)
276 {
277  this->copy(src);
278 }
279 // Destructor ---------------------------------------
280 McOptionsValues::~McOptionsValues()
281 {
282 }
283 // Set methods --------------------------------------
285 McOptionsValues::operator=(const McOptionsValues& rhs)
286 {
287  this->copy(rhs);
288  return *this;
289 }
290 // Private methods-----------------------------------
291 void
293 {
294  // Do nothing
295 }
296 
297 void
298 McOptionsValues::copy(const McOptionsValues& src)
299 {
301  m_dataOutputAllowedSet = src.m_dataOutputAllowedSet;
302  m_pseqDataOutputPeriod = src.m_pseqDataOutputPeriod;
303  m_pseqDataOutputFileName = src.m_pseqDataOutputFileName;
304  m_pseqDataOutputFileType = src.m_pseqDataOutputFileType;
305  m_pseqDataOutputAllowedSet = src.m_pseqDataOutputAllowedSet;
306 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
307  m_pseqComputeStats = src.m_pseqComputeStats;
308 #endif
309  m_qseqDataInputFileName = src.m_qseqDataInputFileName;
310  m_qseqDataInputFileType = src.m_qseqDataInputFileType;
311  m_qseqSize = src.m_qseqSize;
312  m_qseqDisplayPeriod = src.m_qseqDisplayPeriod;
313  m_qseqMeasureRunTimes = src.m_qseqMeasureRunTimes;
314  m_qseqDataOutputPeriod = src.m_qseqDataOutputPeriod;
315  m_qseqDataOutputFileName = src.m_qseqDataOutputFileName;
316  m_qseqDataOutputFileType = src.m_qseqDataOutputFileType;
317  m_qseqDataOutputAllowedSet = src.m_qseqDataOutputAllowedSet;
318 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
319  m_qseqComputeStats = src.m_qseqComputeStats;
320 #endif
321 
322 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
323  m_alternativePSsOptionsValues = src.m_alternativePSsOptionsValues;
324  m_alternativeQSsOptionsValues = src.m_alternativeQSsOptionsValues;
325 #endif
326 
327  return;
328 }
329 
330 std::ostream & operator<<(std::ostream & os, const McOptionsValues & obj)
331 {
332 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
333  os << (*(obj.m_parser)) << std::endl;
334 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
335 
336  os << obj.m_option_dataOutputFileName << " = " << obj.m_dataOutputFileName
337  << "\n" << obj.m_option_dataOutputAllowedSet << " = ";
338  for (std::set<unsigned int>::iterator setIt = obj.m_dataOutputAllowedSet.begin(); setIt != obj.m_dataOutputAllowedSet.end(); ++setIt) {
339  os << *setIt << " ";
340  }
341  os << "\n" << obj.m_option_pseq_dataOutputPeriod << " = " << obj.m_pseqDataOutputPeriod
342  << "\n" << obj.m_option_pseq_dataOutputFileName << " = " << obj.m_pseqDataOutputFileName
343  << "\n" << obj.m_option_pseq_dataOutputFileType << " = " << obj.m_pseqDataOutputFileType
344  << "\n" << obj.m_option_pseq_dataOutputAllowedSet << " = ";
345  for (std::set<unsigned int>::iterator setIt = obj.m_pseqDataOutputAllowedSet.begin(); setIt != obj.m_pseqDataOutputAllowedSet.end(); ++setIt) {
346  os << *setIt << " ";
347  }
348  os
349 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
350  << "\n" << obj.m_option_pseq_computeStats << " = " << obj.m_pseqComputeStats
351 #endif
352  << "\n" << obj.m_option_qseq_dataInputFileName << " = " << obj.m_qseqDataInputFileName
353  << "\n" << obj.m_option_qseq_dataInputFileType << " = " << obj.m_qseqDataInputFileType
354  << "\n" << obj.m_option_qseq_size << " = " << obj.m_qseqSize
355  << "\n" << obj.m_option_qseq_displayPeriod << " = " << obj.m_qseqDisplayPeriod
356  << "\n" << obj.m_option_qseq_measureRunTimes << " = " << obj.m_qseqMeasureRunTimes
357  << "\n" << obj.m_option_qseq_dataOutputPeriod << " = " << obj.m_qseqDataOutputPeriod
358  << "\n" << obj.m_option_qseq_dataOutputFileName << " = " << obj.m_qseqDataOutputFileName
359  << "\n" << obj.m_option_qseq_dataOutputFileType << " = " << obj.m_qseqDataOutputFileType
360  << "\n" << obj.m_option_qseq_dataOutputAllowedSet << " = ";
361  for (std::set<unsigned int>::iterator setIt = obj.m_qseqDataOutputAllowedSet.begin(); setIt != obj.m_qseqDataOutputAllowedSet.end(); ++setIt) {
362  os << *setIt << " ";
363  }
364 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
365  os << "\n" << obj.m_option_qseq_computeStats << " = " << obj.m_qseqComputeStats;
366 #endif
367 
368  return os;
369 }
370 
371 // --------------------------------------------------
372 //MonteCarloSGOptions ------------------------
373 // --------------------------------------------------
374 
375 // Default constructor -----------------------------
376 MonteCarloSGOptions::MonteCarloSGOptions(
377  const BaseEnvironment& env,
378  const char* prefix)
379  :
380 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
381  m_ov (NULL,NULL),
382  m_pseqStatisticalOptionsObj (NULL),
383  m_qseqStatisticalOptionsObj (NULL),
384 #else
385  m_ov (),
386 #endif
387  m_prefix ((std::string)(prefix) + "mc_"),
388  m_env (env),
389 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
390  m_optionsDesc (new boost::program_options::options_description("Monte Carlo options")),
391 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
392  m_option_help (m_prefix + "help" ),
393  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
394  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
395  m_option_pseq_dataOutputPeriod (m_prefix + "pseq_dataOutputPeriod" ),
396  m_option_pseq_dataOutputFileName (m_prefix + "pseq_dataOutputFileName" ),
397  m_option_pseq_dataOutputFileType (m_prefix + "pseq_dataOutputFileType" ),
398  m_option_pseq_dataOutputAllowedSet(m_prefix + "pseq_dataOutputAllowedSet" ),
399 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
400  m_option_pseq_computeStats (m_prefix + "pseq_computeStats" ),
401 #endif
402  m_option_qseq_dataInputFileName (m_prefix + "qseq_dataInputFileName" ),
403  m_option_qseq_dataInputFileType (m_prefix + "qseq_dataInputFileType" ),
404  m_option_qseq_size (m_prefix + "qseq_size" ),
405  m_option_qseq_displayPeriod (m_prefix + "qseq_displayPeriod" ),
406  m_option_qseq_measureRunTimes (m_prefix + "qseq_measureRunTimes" ),
407  m_option_qseq_dataOutputPeriod (m_prefix + "qseq_dataOutputPeriod" ),
408  m_option_qseq_dataOutputFileName (m_prefix + "qseq_dataOutputFileName" ),
409  m_option_qseq_dataOutputFileType (m_prefix + "qseq_dataOutputFileType" ),
410  m_option_qseq_dataOutputAllowedSet(m_prefix + "qseq_dataOutputAllowedSet" )
411 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
412  ,
413  m_option_qseq_computeStats (m_prefix + "qseq_computeStats" )
414 #endif
415 {
416  queso_deprecated();
417  queso_require_not_equal_to_msg(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the absence of an options input file"));
418 }
419 // Constructor 2 -----------------------------------
420 MonteCarloSGOptions::MonteCarloSGOptions(
421  const BaseEnvironment& env,
422  const char* prefix,
423  const McOptionsValues& alternativeOptionsValues)
424  :
425  m_ov (alternativeOptionsValues),
426 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
427  m_pseqStatisticalOptionsObj (NULL),
428  m_qseqStatisticalOptionsObj (NULL),
429 #endif
430  m_prefix ((std::string)(prefix) + "mc_"),
431  m_env (env),
432 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
433  m_optionsDesc (NULL),
434 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
435  m_option_help (m_prefix + "help" ),
436  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
437  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
438  m_option_pseq_dataOutputPeriod (m_prefix + "pseq_dataOutputPeriod" ),
439  m_option_pseq_dataOutputFileName (m_prefix + "pseq_dataOutputFileName" ),
440  m_option_pseq_dataOutputFileType (m_prefix + "pseq_dataOutputFileType" ),
441  m_option_pseq_dataOutputAllowedSet(m_prefix + "pseq_dataOutputAllowedSet"),
442 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
443  m_option_pseq_computeStats (m_prefix + "pseq_computeStats" ),
444 #endif
445  m_option_qseq_dataInputFileName (m_prefix + "qseq_dataInputFileName" ),
446  m_option_qseq_dataInputFileType (m_prefix + "qseq_dataInputFileType" ),
447  m_option_qseq_size (m_prefix + "qseq_size" ),
448  m_option_qseq_displayPeriod (m_prefix + "qseq_displayPeriod" ),
449  m_option_qseq_measureRunTimes (m_prefix + "qseq_measureRunTimes" ),
450  m_option_qseq_dataOutputPeriod (m_prefix + "qseq_dataOutputPeriod" ),
451  m_option_qseq_dataOutputFileName (m_prefix + "qseq_dataOutputFileName" ),
452  m_option_qseq_dataOutputFileType (m_prefix + "qseq_dataOutputFileType" ),
453  m_option_qseq_dataOutputAllowedSet(m_prefix + "qseq_dataOutputAllowedSet")
454 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
455  ,
456  m_option_qseq_computeStats (m_prefix + "qseq_computeStats" )
457 #endif
458 {
459  queso_deprecated();
460  queso_require_equal_to_msg(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"));
461 
462  if (m_env.subDisplayFile() != NULL) {
463  *m_env.subDisplayFile() << "In MonteCarloSGOptions::constructor(2)"
464  << ": after setting values of options with prefix '" << m_prefix
465  << "', state of object is:"
466  << "\n" << *this
467  << std::endl;
468  }
469 
470  // dakota
471 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
472  if (m_ov.m_pseqComputeStats) m_pseqStatisticalOptionsObj =
473  new SequenceStatisticalOptions(m_env,m_prefix + "pseq_",m_ov.m_alternativePSsOptionsValues);
474  if (m_ov.m_qseqComputeStats) m_qseqStatisticalOptionsObj =
475  new SequenceStatisticalOptions(m_env,m_prefix + "qseq_",m_ov.m_alternativeQSsOptionsValues);
476 #endif
477 }
478 // Destructor --------------------------------------
479 MonteCarloSGOptions::~MonteCarloSGOptions()
480 {
481  queso_deprecated();
482 
483 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
484  if (m_pseqStatisticalOptionsObj) delete m_pseqStatisticalOptionsObj; // dakota
485  if (m_qseqStatisticalOptionsObj) delete m_qseqStatisticalOptionsObj; // dakota
486 #endif
487 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
488  if (m_optionsDesc ) delete m_optionsDesc;
489 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
490 }
491 // I/O methods -------------------------------------
492 void
493 MonteCarloSGOptions::scanOptionsValues()
494 {
495  queso_deprecated();
496 
497 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
498  queso_require_msg(m_optionsDesc, "m_optionsDesc variable is NULL");
499 
500  defineMyOptions (*m_optionsDesc);
501  m_env.scanInputFileForMyOptions(*m_optionsDesc);
502  getMyOptionValues (*m_optionsDesc);
503 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
504 
505  if (m_env.subDisplayFile() != NULL) {
506  *m_env.subDisplayFile() << "In MonteCarloSGOptions::scanOptionsValues()"
507  << ": after reading values of options with prefix '" << m_prefix
508  << "', state of object is:"
509  << "\n" << *this
510  << std::endl;
511  }
512 
513  // dakota
514 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
515  if (m_ov.m_pseqComputeStats) m_pseqStatisticalOptionsObj =
516  new SequenceStatisticalOptions(m_env,m_prefix + "pseq_");
517  if (m_ov.m_qseqComputeStats) m_qseqStatisticalOptionsObj =
518  new SequenceStatisticalOptions(m_env,m_prefix + "qseq_");
519 #endif
520  return;
521 }
522 // Private methods ---------------------------------
523 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
524 void
525 MonteCarloSGOptions::defineMyOptions(boost::program_options::options_description& optionsDesc) const
526 {
527  queso_deprecated();
528 
529  optionsDesc.add_options()
530  (m_option_help.c_str(), "produce help message for Monte Carlo distribution calculator")
531  (m_option_dataOutputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MOC_SG_DATA_OUTPUT_FILE_NAME_ODV ), "name of generic data output file" )
532  (m_option_dataOutputAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MOC_SG_DATA_OUTPUT_ALLOWED_SET_ODV ), "subEnvs that will write to generic data output file" )
533  (m_option_pseq_dataOutputPeriod.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MOC_SG_PSEQ_DATA_OUTPUT_PERIOD_ODV ), "period of message display during param sequence generation" )
534  (m_option_pseq_dataOutputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_NAME_ODV ), "name of data output file for parameters" )
535  (m_option_pseq_dataOutputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_TYPE_ODV ), "type of data output file for parameters" )
536  (m_option_pseq_dataOutputAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MOC_SG_PSEQ_DATA_OUTPUT_ALLOWED_SET_ODV), "subEnvs that will write to data output file for parameters" )
537 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
538  (m_option_pseq_computeStats.c_str(), boost::program_options::value<bool >()->default_value(UQ_MOC_SG_PSEQ_COMPUTE_STATS_ODV ), "compute statistics on sequence of parameter" )
539 #endif
540  (m_option_qseq_dataInputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_NAME_ODV ), "name of data input file for qois" )
541  (m_option_qseq_dataInputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_TYPE_ODV ), "type of data input file for qois" )
542  (m_option_qseq_size.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MOC_SG_QSEQ_SIZE_ODV ), "size of qoi sequence" )
543  (m_option_qseq_displayPeriod.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MOC_SG_QSEQ_DISPLAY_PERIOD_ODV ), "period of message display during qoi sequence generation" )
544  (m_option_qseq_measureRunTimes.c_str(), boost::program_options::value<bool >()->default_value(UQ_MOC_SG_QSEQ_MEASURE_RUN_TIMES_ODV ), "measure run times" )
545  (m_option_qseq_dataOutputPeriod.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MOC_SG_QSEQ_DATA_OUTPUT_PERIOD_ODV ), "period of message display during qoi sequence generation" )
546  (m_option_qseq_dataOutputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_NAME_ODV ), "name of data output file for qois" )
547  (m_option_qseq_dataOutputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_TYPE_ODV ), "type of data output file for qois" )
548  (m_option_qseq_dataOutputAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MOC_SG_QSEQ_DATA_OUTPUT_ALLOWED_SET_ODV), "subEnvs that will write to data output file for qois" )
549 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
550  (m_option_qseq_computeStats.c_str(), boost::program_options::value<bool >()->default_value(UQ_MOC_SG_QSEQ_COMPUTE_STATS_ODV ), "compute statistics on sequence of qoi" )
551 #endif
552  ;
553 
554  return;
555 }
556 
557 void
558 MonteCarloSGOptions::getMyOptionValues(boost::program_options::options_description& optionsDesc)
559 {
560  queso_deprecated();
561 
562  if (m_env.allOptionsMap().count(m_option_help)) {
563  if (m_env.subDisplayFile()) {
564  *m_env.subDisplayFile() << optionsDesc
565  << std::endl;
566  }
567  }
568 
569  if (m_env.allOptionsMap().count(m_option_dataOutputFileName)) {
570  m_ov.m_dataOutputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_dataOutputFileName]).as<std::string>();
571  }
572 
573  if (m_env.allOptionsMap().count(m_option_dataOutputAllowedSet)) {
574  m_ov.m_dataOutputAllowedSet.clear();
575  std::vector<double> tmpAllow(0,0.);
576  std::string inputString = m_env.allOptionsMap()[m_option_dataOutputAllowedSet].as<std::string>();
577  MiscReadDoublesFromString(inputString,tmpAllow);
578 
579  if (tmpAllow.size() > 0) {
580  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
581  m_ov.m_dataOutputAllowedSet.insert((unsigned int) tmpAllow[i]);
582  }
583  }
584  }
585 
586  if (m_env.allOptionsMap().count(m_option_pseq_dataOutputPeriod)) {
587  m_ov.m_pseqDataOutputPeriod = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_pseq_dataOutputPeriod]).as<unsigned int>();
588  }
589 
590  if (m_env.allOptionsMap().count(m_option_pseq_dataOutputFileName)) {
591  m_ov.m_pseqDataOutputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_pseq_dataOutputFileName]).as<std::string>();
592  }
593 
594  if (m_env.allOptionsMap().count(m_option_pseq_dataOutputFileType)) {
595  m_ov.m_pseqDataOutputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_pseq_dataOutputFileType]).as<std::string>();
596  }
597 
598  if (m_env.allOptionsMap().count(m_option_pseq_dataOutputAllowedSet)) {
599  m_ov.m_pseqDataOutputAllowedSet.clear();
600  std::vector<double> tmpAllow(0,0.);
601  std::string inputString = m_env.allOptionsMap()[m_option_pseq_dataOutputAllowedSet].as<std::string>();
602  MiscReadDoublesFromString(inputString,tmpAllow);
603 
604  if (tmpAllow.size() > 0) {
605  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
606  m_ov.m_pseqDataOutputAllowedSet.insert((unsigned int) tmpAllow[i]);
607  }
608  }
609  }
610 
611 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
612  if (m_env.allOptionsMap().count(m_option_pseq_computeStats)) {
613  m_ov.m_pseqComputeStats = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_pseq_computeStats]).as<bool>();
614  }
615 #endif
616  if (m_env.allOptionsMap().count(m_option_qseq_dataInputFileName)) {
617  m_ov.m_qseqDataInputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_qseq_dataInputFileName]).as<std::string>();
618  }
619 
620  if (m_env.allOptionsMap().count(m_option_qseq_dataInputFileType)) {
621  m_ov.m_qseqDataInputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_qseq_dataInputFileType]).as<std::string>();
622  }
623 
624  if (m_env.allOptionsMap().count(m_option_qseq_size)) {
625  m_ov.m_qseqSize = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_qseq_size]).as<unsigned int>();
626  }
627 
628  if (m_env.allOptionsMap().count(m_option_qseq_displayPeriod)) {
629  m_ov.m_qseqDisplayPeriod = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_qseq_displayPeriod]).as<unsigned int>();
630  }
631 
632  if (m_env.allOptionsMap().count(m_option_qseq_measureRunTimes)) {
633  m_ov.m_qseqMeasureRunTimes = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_qseq_measureRunTimes]).as<bool>();
634  }
635 
636  if (m_env.allOptionsMap().count(m_option_qseq_dataOutputPeriod)) {
637  m_ov.m_qseqDataOutputPeriod = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_qseq_dataOutputPeriod]).as<unsigned int>();
638  }
639 
640  if (m_env.allOptionsMap().count(m_option_qseq_dataOutputFileName)) {
641  m_ov.m_qseqDataOutputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_qseq_dataOutputFileName]).as<std::string>();
642  }
643 
644  if (m_env.allOptionsMap().count(m_option_qseq_dataOutputFileType)) {
645  m_ov.m_qseqDataOutputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_qseq_dataOutputFileType]).as<std::string>();
646  }
647 
648  if (m_env.allOptionsMap().count(m_option_qseq_dataOutputAllowedSet)) {
649  m_ov.m_qseqDataOutputAllowedSet.clear();
650  std::vector<double> tmpAllow(0,0.);
651  std::string inputString = m_env.allOptionsMap()[m_option_qseq_dataOutputAllowedSet].as<std::string>();
652  MiscReadDoublesFromString(inputString,tmpAllow);
653 
654  if (tmpAllow.size() > 0) {
655  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
656  m_ov.m_qseqDataOutputAllowedSet.insert((unsigned int) tmpAllow[i]);
657  }
658  }
659  }
660 
661 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
662  if (m_env.allOptionsMap().count(m_option_qseq_computeStats)) {
663  m_ov.m_qseqComputeStats = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_qseq_computeStats]).as<bool>();
664  }
665 #endif
666  return;
667 }
668 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
669 
670 void
671 MonteCarloSGOptions::print(std::ostream& os) const
672 {
673  queso_deprecated();
674 
675  os << m_option_dataOutputFileName << " = " << m_ov.m_dataOutputFileName
676  << "\n" << m_option_dataOutputAllowedSet << " = ";
677  for (std::set<unsigned int>::iterator setIt = m_ov.m_dataOutputAllowedSet.begin(); setIt != m_ov.m_dataOutputAllowedSet.end(); ++setIt) {
678  os << *setIt << " ";
679  }
680  os << "\n" << m_option_pseq_dataOutputPeriod << " = " << m_ov.m_pseqDataOutputPeriod
681  << "\n" << m_option_pseq_dataOutputFileName << " = " << m_ov.m_pseqDataOutputFileName
682  << "\n" << m_option_pseq_dataOutputFileType << " = " << m_ov.m_pseqDataOutputFileType
683  << "\n" << m_option_pseq_dataOutputAllowedSet << " = ";
684  for (std::set<unsigned int>::iterator setIt = m_ov.m_pseqDataOutputAllowedSet.begin(); setIt != m_ov.m_pseqDataOutputAllowedSet.end(); ++setIt) {
685  os << *setIt << " ";
686  }
687  os
688 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
689  << "\n" << m_option_pseq_computeStats << " = " << m_ov.m_pseqComputeStats
690 #endif
691  << "\n" << m_option_qseq_dataInputFileName << " = " << m_ov.m_qseqDataInputFileName
692  << "\n" << m_option_qseq_dataInputFileType << " = " << m_ov.m_qseqDataInputFileType
693  << "\n" << m_option_qseq_size << " = " << m_ov.m_qseqSize
694  << "\n" << m_option_qseq_displayPeriod << " = " << m_ov.m_qseqDisplayPeriod
695  << "\n" << m_option_qseq_measureRunTimes << " = " << m_ov.m_qseqMeasureRunTimes
696  << "\n" << m_option_qseq_dataOutputPeriod << " = " << m_ov.m_qseqDataOutputPeriod
697  << "\n" << m_option_qseq_dataOutputFileName << " = " << m_ov.m_qseqDataOutputFileName
698  << "\n" << m_option_qseq_dataOutputFileType << " = " << m_ov.m_qseqDataOutputFileType
699  << "\n" << m_option_qseq_dataOutputAllowedSet << " = ";
700  for (std::set<unsigned int>::iterator setIt = m_ov.m_qseqDataOutputAllowedSet.begin(); setIt != m_ov.m_qseqDataOutputAllowedSet.end(); ++setIt) {
701  os << *setIt << " ";
702  }
703 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
704  os << "\n" << m_option_qseq_computeStats << " = " << m_ov.m_qseqComputeStats;
705 #endif
706 
707  return;
708 }
709 
710 std::ostream& operator<<(std::ostream& os, const MonteCarloSGOptions& obj)
711 {
712  queso_deprecated();
713 
714  obj.print(os);
715 
716  return os;
717 }
718 
719 } // End namespace QUESO
std::string m_option_pseq_dataOutputFileName
std::ostream & operator<<(std::ostream &os, const SequenceStatisticalOptions &obj)
std::string m_option_pseq_computeStats
std::set< unsigned int > m_qseqDataOutputAllowedSet
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
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix queso_require_not_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the absence of an options input file"))
std::string m_option_dataOutputAllowedSet
std::string m_option_qseq_displayPeriod
std::string m_option_qseq_dataOutputFileName
std::set< unsigned int > m_pseqDataOutputAllowedSet
BoostInputOptionsParser * m_parser
std::string m_option_qseq_measureRunTimes
McOptionsValues()
Default constructor.
SsOptionsValues m_alternativeQSsOptionsValues
std::string m_option_pseq_dataOutputAllowedSet
SsOptionsValues m_alternativePSsOptionsValues
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
Definition: Miscellaneous.C:40
std::string m_option_dataOutputFileName
std::string m_option_qseq_dataInputFileName
std::set< unsigned int > m_dataOutputAllowedSet
void print(std::ostream &os) const
It prints the option values.
std::string m_option_pseq_dataOutputPeriod
std::string m_option_qseq_dataOutputPeriod
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
std::string m_option_qseq_dataOutputFileType
std::string m_option_qseq_dataOutputAllowedSet
checkOptions()
std::string m_option_qseq_computeStats
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320
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:56 for queso-0.57.1 by  doxygen 1.8.5