queso-0.53.0
SequenceStatisticalOptions.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_SEQUENCE_STATISTICAL_OPTIONS_H
26 #define UQ_SEQUENCE_STATISTICAL_OPTIONS_H
27 
28 #include <queso/Defines.h>
29 
30 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
31 
32 #include <queso/Environment.h>
33 #include <queso/BoostInputOptionsParser.h>
34 
35 #define UQ_SEQUENCE_INITIAL_DISCARDED_PORTIONS_ODV "0."
36 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
37 #define UQ_SEQUENCE_MEAN_MONITOR_PERIOD_ODV 0
38 #define UQ_SEQUENCE_BMM_RUN_ODV 0
39 #define UQ_SEQUENCE_BMM_LENGTHS_ODV "0"
40 #define UQ_SEQUENCE_BMM_DISPLAY_ODV 0
41 #define UQ_SEQUENCE_BMM_WRITE_ODV 0
42 #define UQ_SEQUENCE_FFT_COMPUTE_ODV 0
43 #define UQ_SEQUENCE_FFT_PARAM_ID_ODV 0
44 #define UQ_SEQUENCE_FFT_SIZE_ODV 2048
45 #define UQ_SEQUENCE_FFT_TEST_INVERSION_ODV 0
46 #define UQ_SEQUENCE_FFT_WRITE_ODV 0
47 #define UQ_SEQUENCE_PSD_COMPUTE_ODV 0
48 #define UQ_SEQUENCE_PSD_NUM_BLOCKS_ODV 8
49 #define UQ_SEQUENCE_PSD_HOP_SIZE_RATIO_ODV 0.
50 #define UQ_SEQUENCE_PSD_PARAM_ID_ODV 0
51 #define UQ_SEQUENCE_PSD_WRITE_ODV 0
52 #define UQ_SEQUENCE_PSD_AT_ZERO_COMPUTE_ODV 0
53 #define UQ_SEQUENCE_PSD_AT_ZERO_NUM_BLOCKS_ODV "8"
54 #define UQ_SEQUENCE_PSD_AT_ZERO_HOP_SIZE_RATIO_ODV .5
55 #define UQ_SEQUENCE_PSD_AT_ZERO_DISPLAY_ODV 0
56 #define UQ_SEQUENCE_PSD_AT_ZERO_WRITE_ODV 0
57 #define UQ_SEQUENCE_GEWEKE_COMPUTE_ODV 0
58 #define UQ_SEQUENCE_GEWEKE_NA_RATIO_ODV .1
59 #define UQ_SEQUENCE_GEWEKE_NB_RATIO_ODV .5
60 #define UQ_SEQUENCE_GEWEKE_DISPLAY_ODV 0
61 #define UQ_SEQUENCE_GEWEKE_WRITE_ODV 0
62 #define UQ_SEQUENCE_MEAN_STACC_COMPUTE_ODV 0
63 #define UQ_SEQUENCE_HIST_COMPUTE_ODV 0
64 #define UQ_SEQUENCE_HIST_NUM_INTERNAL_BINS_ODV 100
65 #define UQ_SEQUENCE_CDF_STACC_COMPUTE_ODV 0
66 #define UQ_SEQUENCE_CDF_STACC_NUM_EVAL_POSITIONS_ODV 50
67 #endif
68 #define UQ_SEQUENCE_AUTO_CORR_COMPUTE_VIA_DEF_ODV 0
69 #define UQ_SEQUENCE_AUTO_CORR_COMPUTE_VIA_FFT_ODV 0
70 #define UQ_SEQUENCE_AUTO_CORR_SECOND_LAG_ODV 0
71 #define UQ_SEQUENCE_AUTO_CORR_LAG_SPACING_ODV 0
72 #define UQ_SEQUENCE_AUTO_CORR_NUM_LAGS_ODV 0
73 #define UQ_SEQUENCE_AUTO_CORR_DISPLAY_ODV 0
74 #define UQ_SEQUENCE_AUTO_CORR_WRITE_ODV 0
75 #define UQ_SEQUENCE_KDE_COMPUTE_ODV 0
76 #define UQ_SEQUENCE_KDE_NUM_EVAL_POSITIONS_ODV 100
77 #define UQ_SEQUENCE_COV_MATRIX_COMPUTE_ODV 0
78 #define UQ_SEQUENCE_CORR_MATRIX_COMPUTE_ODV 0
79 
80 namespace boost {
81  namespace program_options {
82  class options_description;
83  }
84 }
85 
94 class SsOptionsValues
95 {
96 public:
98 
99 
101  SsOptionsValues ();
102 
104 
105  SsOptionsValues(const BaseEnvironment * env, const char * prefix);
106 
108 
109  SsOptionsValues (const SsOptionsValues& src);
110 
112  virtual ~SsOptionsValues ();
114 
116 
117  SsOptionsValues& operator= (const SsOptionsValues& rhs);
120 
122 
123 
124  std::string m_prefix;
125 
127  std::vector<double> m_initialDiscardedPortions;
128 
130  bool m_autoCorrComputeViaDef;
131 
133  bool m_autoCorrComputeViaFft;
134 
136  unsigned int m_autoCorrSecondLag;
137 
139  unsigned int m_autoCorrLagSpacing;
140 
142  unsigned int m_autoCorrNumLags;
143 
145  bool m_autoCorrDisplay;
146 
148  bool m_autoCorrWrite;
149 
151  bool m_kdeCompute;
152 
154  unsigned int m_kdeNumEvalPositions;
155 
157  bool m_covMatrixCompute;
158 
160  bool m_corrMatrixCompute;
161 
162 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
163  unsigned int m_meanMonitorPeriod;
164 
165  bool m_bmmRun;
166  std::vector<unsigned int> m_bmmLengths;
167  bool m_bmmDisplay;
168  bool m_bmmWrite;
169 
170  bool m_fftCompute;
171  unsigned int m_fftParamId;
172  unsigned int m_fftSize;
173  bool m_fftTestInversion;
174  bool m_fftWrite;
175 
176  bool m_psdCompute;
177  unsigned int m_psdNumBlocks;
178  double m_psdHopSizeRatio;
179  unsigned int m_psdParamId;
180  bool m_psdWrite;
181 
182  bool m_psdAtZeroCompute;
183  std::vector<unsigned int> m_psdAtZeroNumBlocks;
184  double m_psdAtZeroHopSizeRatio;
185  bool m_psdAtZeroDisplay;
186  bool m_psdAtZeroWrite;
187 
188  bool m_gewekeCompute;
189  double m_gewekeNaRatio;
190  double m_gewekeNbRatio;
191  bool m_gewekeDisplay;
192  bool m_gewekeWrite;
193 
194  bool m_meanStaccCompute;
195 
196  bool m_histCompute;
197  unsigned int m_histNumInternalBins;
198 
199  bool m_cdfStaccCompute;
200  unsigned int m_cdfStaccNumEvalPositions;
201 #endif
202 
203  // end public attributes
204 private:
205  BoostInputOptionsParser * m_parser;
206 
207  std::string m_option_help;
208  std::string m_option_initialDiscardedPortions;
209 
210  std::string m_option_autoCorr_computeViaDef;
211  std::string m_option_autoCorr_computeViaFft;
212  std::string m_option_autoCorr_secondLag;
213  std::string m_option_autoCorr_lagSpacing;
214  std::string m_option_autoCorr_numLags;
215  std::string m_option_autoCorr_display;
216  std::string m_option_autoCorr_write;
217  std::string m_option_kde_compute;
218  std::string m_option_kde_numEvalPositions;
219  std::string m_option_covMatrix_compute;
220  std::string m_option_corrMatrix_compute;
221 
222 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
223  std::string m_option_mean_monitorPeriod;
224  std::string m_option_bmm_run;
225  std::string m_option_bmm_lengths;
226  std::string m_option_bmm_display;
227  std::string m_option_bmm_write;
228  std::string m_option_fft_compute;
229  std::string m_option_fft_paramId;
230  std::string m_option_fft_size;
231  std::string m_option_fft_testInversion;
232  std::string m_option_fft_write;
233  std::string m_option_psd_compute;
234  std::string m_option_psd_numBlocks;
235  std::string m_option_psd_hopSizeRatio;
236  std::string m_option_psd_paramId;
237  std::string m_option_psd_write;
238  std::string m_option_psdAtZero_compute;
239  std::string m_option_psdAtZero_numBlocks;
240  std::string m_option_psdAtZero_hopSizeRatio;
241  std::string m_option_psdAtZero_display;
242  std::string m_option_psdAtZero_write;
243  std::string m_option_geweke_compute;
244  std::string m_option_geweke_naRatio;
245  std::string m_option_geweke_nbRatio;
246  std::string m_option_geweke_display;
247  std::string m_option_geweke_write;
248  std::string m_option_meanStacc_compute;
249  std::string m_option_hist_compute;
250  std::string m_option_hist_numInternalBins;
251  std::string m_option_cdfStacc_compute;
252  std::string m_option_cdfStacc_numEvalPositions;
253 #endif
254 
256  void copy(const SsOptionsValues& src);
257 };
258 
259 //------------------------------------------------------------------------------------------------
260 
269 class SequenceStatisticalOptions
270 {
271 public:
273 
274 
277  SequenceStatisticalOptions(const BaseEnvironment& env,
278  const std::string& prefix);
279 
281 
283  SequenceStatisticalOptions(const BaseEnvironment& env,
284  const std::string& prefix,
285  const SsOptionsValues& alternativeOptionsValues);
287  ~SequenceStatisticalOptions();
289 
291 
292 
294  const std::vector<double>& initialDiscardedPortions() const;
295 
297  bool autoCorrComputeViaDef() const;
298 
300  bool autoCorrComputeViaFft() const;
301 
303  unsigned int autoCorrSecondLag () const;
304 
306  unsigned int autoCorrLagSpacing () const;
307 
309  unsigned int autoCorrNumLags () const;
310 
312  bool autoCorrDisplay () const;
313 
315  bool autoCorrWrite () const;
316 
318  bool kdeCompute () const;
319 
321  unsigned int kdeNumEvalPositions() const;
322 
324  bool covMatrixCompute () const;
325 
327  bool corrMatrixCompute() const;
329 
331 
332  void print(std::ostream& os) const;
335 
337 
338  SsOptionsValues m_ov;
340 
341 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
342 
343  unsigned int meanMonitorPeriod() const;
344 
345  bool bmmRun () const;
346  const std::vector<unsigned int>& bmmLengths() const;
347  bool bmmDisplay() const;
348  bool bmmWrite () const;
349 
350  bool fftCompute () const;
351  unsigned int fftParamId () const;
352  unsigned int fftSize () const;
353  bool fftTestInversion() const;
354  bool fftWrite () const;
355 
356  bool psdCompute () const;
357  unsigned int psdNumBlocks () const;
358  double psdHopSizeRatio() const;
359  unsigned int psdParamId () const;
360  bool psdWrite () const;
361 
362  bool psdAtZeroCompute () const;
363  const std::vector<unsigned int>& psdAtZeroNumBlocks () const;
364  double psdAtZeroHopSizeRatio() const;
365  bool psdAtZeroDisplay () const;
366  bool psdAtZeroWrite () const;
367 
368  bool gewekeCompute() const;
369  double gewekeNaRatio() const;
370  double gewekeNbRatio() const;
371  bool gewekeDisplay() const;
372  bool gewekeWrite () const;
373 
374  bool meanStaccCompute() const;
375 
376  bool histCompute () const;
377  unsigned int histNumInternalBins() const;
378 
379  bool cdfStaccCompute () const;
380  unsigned int cdfStaccNumEvalPositions() const;
381 #endif
382 
383 private:
385  void defineMyOptions (boost::program_options::options_description& optionsDesc) const;
386 
388  void getMyOptionValues(boost::program_options::options_description& optionsDesc);
389 
390  std::string m_prefix;
391  const BaseEnvironment& m_env;
392  boost::program_options::options_description* m_optionsDesc;
393 
394  std::string m_option_help;
395  std::string m_option_initialDiscardedPortions;
396 
397  std::string m_option_autoCorr_computeViaDef;
398  std::string m_option_autoCorr_computeViaFft;
399  std::string m_option_autoCorr_secondLag;
400  std::string m_option_autoCorr_lagSpacing;
401  std::string m_option_autoCorr_numLags;
402  std::string m_option_autoCorr_display;
403  std::string m_option_autoCorr_write;
404  std::string m_option_kde_compute;
405  std::string m_option_kde_numEvalPositions;
406  std::string m_option_covMatrix_compute;
407  std::string m_option_corrMatrix_compute;
408 
409 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
410  std::string m_option_mean_monitorPeriod;
411  std::string m_option_bmm_run;
412  std::string m_option_bmm_lengths;
413  std::string m_option_bmm_display;
414  std::string m_option_bmm_write;
415  std::string m_option_fft_compute;
416  std::string m_option_fft_paramId;
417  std::string m_option_fft_size;
418  std::string m_option_fft_testInversion;
419  std::string m_option_fft_write;
420  std::string m_option_psd_compute;
421  std::string m_option_psd_numBlocks;
422  std::string m_option_psd_hopSizeRatio;
423  std::string m_option_psd_paramId;
424  std::string m_option_psd_write;
425  std::string m_option_psdAtZero_compute;
426  std::string m_option_psdAtZero_numBlocks;
427  std::string m_option_psdAtZero_hopSizeRatio;
428  std::string m_option_psdAtZero_display;
429  std::string m_option_psdAtZero_write;
430  std::string m_option_geweke_compute;
431  std::string m_option_geweke_naRatio;
432  std::string m_option_geweke_nbRatio;
433  std::string m_option_geweke_display;
434  std::string m_option_geweke_write;
435  std::string m_option_meanStacc_compute;
436  std::string m_option_hist_compute;
437  std::string m_option_hist_numInternalBins;
438  std::string m_option_cdfStacc_compute;
439  std::string m_option_cdfStacc_numEvalPositions;
440 #endif
441 
442 };
443 
444 std::ostream& operator<<(std::ostream& os, const SequenceStatisticalOptions& obj);
445 
446 #endif // ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
447 
448 #endif // UQ_SEQUENCE_STATISTICAL_OPTIONS_H
449 
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step which gives you legal permission to copy
Definition: License.txt:60

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