queso-0.52.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 
34 #define UQ_SEQUENCE_INITIAL_DISCARDED_PORTIONS_ODV "0."
35 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
36 #define UQ_SEQUENCE_MEAN_MONITOR_PERIOD_ODV 0
37 #define UQ_SEQUENCE_BMM_RUN_ODV 0
38 #define UQ_SEQUENCE_BMM_LENGTHS_ODV "0"
39 #define UQ_SEQUENCE_BMM_DISPLAY_ODV 0
40 #define UQ_SEQUENCE_BMM_WRITE_ODV 0
41 #define UQ_SEQUENCE_FFT_COMPUTE_ODV 0
42 #define UQ_SEQUENCE_FFT_PARAM_ID_ODV 0
43 #define UQ_SEQUENCE_FFT_SIZE_ODV 2048
44 #define UQ_SEQUENCE_FFT_TEST_INVERSION_ODV 0
45 #define UQ_SEQUENCE_FFT_WRITE_ODV 0
46 #define UQ_SEQUENCE_PSD_COMPUTE_ODV 0
47 #define UQ_SEQUENCE_PSD_NUM_BLOCKS_ODV 8
48 #define UQ_SEQUENCE_PSD_HOP_SIZE_RATIO_ODV 0.
49 #define UQ_SEQUENCE_PSD_PARAM_ID_ODV 0
50 #define UQ_SEQUENCE_PSD_WRITE_ODV 0
51 #define UQ_SEQUENCE_PSD_AT_ZERO_COMPUTE_ODV 0
52 #define UQ_SEQUENCE_PSD_AT_ZERO_NUM_BLOCKS_ODV "8"
53 #define UQ_SEQUENCE_PSD_AT_ZERO_HOP_SIZE_RATIO_ODV .5
54 #define UQ_SEQUENCE_PSD_AT_ZERO_DISPLAY_ODV 0
55 #define UQ_SEQUENCE_PSD_AT_ZERO_WRITE_ODV 0
56 #define UQ_SEQUENCE_GEWEKE_COMPUTE_ODV 0
57 #define UQ_SEQUENCE_GEWEKE_NA_RATIO_ODV .1
58 #define UQ_SEQUENCE_GEWEKE_NB_RATIO_ODV .5
59 #define UQ_SEQUENCE_GEWEKE_DISPLAY_ODV 0
60 #define UQ_SEQUENCE_GEWEKE_WRITE_ODV 0
61 #define UQ_SEQUENCE_MEAN_STACC_COMPUTE_ODV 0
62 #define UQ_SEQUENCE_HIST_COMPUTE_ODV 0
63 #define UQ_SEQUENCE_HIST_NUM_INTERNAL_BINS_ODV 100
64 #define UQ_SEQUENCE_CDF_STACC_COMPUTE_ODV 0
65 #define UQ_SEQUENCE_CDF_STACC_NUM_EVAL_POSITIONS_ODV 50
66 #endif
67 #define UQ_SEQUENCE_AUTO_CORR_COMPUTE_VIA_DEF_ODV 0
68 #define UQ_SEQUENCE_AUTO_CORR_COMPUTE_VIA_FFT_ODV 0
69 #define UQ_SEQUENCE_AUTO_CORR_SECOND_LAG_ODV 0
70 #define UQ_SEQUENCE_AUTO_CORR_LAG_SPACING_ODV 0
71 #define UQ_SEQUENCE_AUTO_CORR_NUM_LAGS_ODV 0
72 #define UQ_SEQUENCE_AUTO_CORR_DISPLAY_ODV 0
73 #define UQ_SEQUENCE_AUTO_CORR_WRITE_ODV 0
74 #define UQ_SEQUENCE_KDE_COMPUTE_ODV 0
75 #define UQ_SEQUENCE_KDE_NUM_EVAL_POSITIONS_ODV 100
76 #define UQ_SEQUENCE_COV_MATRIX_COMPUTE_ODV 0
77 #define UQ_SEQUENCE_CORR_MATRIX_COMPUTE_ODV 0
78 
79 
89 class SsOptionsValues
90 {
91 public:
93 
94 
96  SsOptionsValues ();
97 
99 
100  SsOptionsValues (const SsOptionsValues& src);
101 
103  ~SsOptionsValues ();
105 
107 
108  SsOptionsValues& operator= (const SsOptionsValues& rhs);
111 
113 
114 
116  std::vector<double> m_initialDiscardedPortions;
117 
119  bool m_autoCorrComputeViaDef;
120 
122  bool m_autoCorrComputeViaFft;
123 
125  unsigned int m_autoCorrSecondLag;
126 
128  unsigned int m_autoCorrLagSpacing;
129 
131  unsigned int m_autoCorrNumLags;
132 
134  bool m_autoCorrDisplay;
135 
137  bool m_autoCorrWrite;
138 
140  bool m_kdeCompute;
141 
143  unsigned int m_kdeNumEvalPositions;
144 
146  bool m_covMatrixCompute;
147 
149  bool m_corrMatrixCompute;
150 
151 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
152  unsigned int m_meanMonitorPeriod;
153 
154  bool m_bmmRun;
155  std::vector<unsigned int> m_bmmLengths;
156  bool m_bmmDisplay;
157  bool m_bmmWrite;
158 
159  bool m_fftCompute;
160  unsigned int m_fftParamId;
161  unsigned int m_fftSize;
162  bool m_fftTestInversion;
163  bool m_fftWrite;
164 
165  bool m_psdCompute;
166  unsigned int m_psdNumBlocks;
167  double m_psdHopSizeRatio;
168  unsigned int m_psdParamId;
169  bool m_psdWrite;
170 
171  bool m_psdAtZeroCompute;
172  std::vector<unsigned int> m_psdAtZeroNumBlocks;
173  double m_psdAtZeroHopSizeRatio;
174  bool m_psdAtZeroDisplay;
175  bool m_psdAtZeroWrite;
176 
177  bool m_gewekeCompute;
178  double m_gewekeNaRatio;
179  double m_gewekeNbRatio;
180  bool m_gewekeDisplay;
181  bool m_gewekeWrite;
182 
183  bool m_meanStaccCompute;
184 
185  bool m_histCompute;
186  unsigned int m_histNumInternalBins;
187 
188  bool m_cdfStaccCompute;
189  unsigned int m_cdfStaccNumEvalPositions;
190 #endif
191 
192  // end public attributes
193 private:
195  void copy(const SsOptionsValues& src);
196 };
197 
198 //------------------------------------------------------------------------------------------------
199 
208 class SequenceStatisticalOptions
209 {
210 public:
212 
213 
216  SequenceStatisticalOptions(const BaseEnvironment& env,
217  const std::string& prefix);
218 
220 
222  SequenceStatisticalOptions(const BaseEnvironment& env,
223  const std::string& prefix,
224  const SsOptionsValues& alternativeOptionsValues);
226  ~SequenceStatisticalOptions();
228 
230 
231 
233  const std::vector<double>& initialDiscardedPortions() const;
234 
236  bool autoCorrComputeViaDef() const;
237 
239  bool autoCorrComputeViaFft() const;
240 
242  unsigned int autoCorrSecondLag () const;
243 
245  unsigned int autoCorrLagSpacing () const;
246 
248  unsigned int autoCorrNumLags () const;
249 
251  bool autoCorrDisplay () const;
252 
254  bool autoCorrWrite () const;
255 
257  bool kdeCompute () const;
258 
260  unsigned int kdeNumEvalPositions() const;
261 
263  bool covMatrixCompute () const;
264 
266  bool corrMatrixCompute() const;
268 
270 
271  void print(std::ostream& os) const;
274 
276 
277  SsOptionsValues m_ov;
279 
280 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
281 
282  unsigned int meanMonitorPeriod() const;
283 
284  bool bmmRun () const;
285  const std::vector<unsigned int>& bmmLengths() const;
286  bool bmmDisplay() const;
287  bool bmmWrite () const;
288 
289  bool fftCompute () const;
290  unsigned int fftParamId () const;
291  unsigned int fftSize () const;
292  bool fftTestInversion() const;
293  bool fftWrite () const;
294 
295  bool psdCompute () const;
296  unsigned int psdNumBlocks () const;
297  double psdHopSizeRatio() const;
298  unsigned int psdParamId () const;
299  bool psdWrite () const;
300 
301  bool psdAtZeroCompute () const;
302  const std::vector<unsigned int>& psdAtZeroNumBlocks () const;
303  double psdAtZeroHopSizeRatio() const;
304  bool psdAtZeroDisplay () const;
305  bool psdAtZeroWrite () const;
306 
307  bool gewekeCompute() const;
308  double gewekeNaRatio() const;
309  double gewekeNbRatio() const;
310  bool gewekeDisplay() const;
311  bool gewekeWrite () const;
312 
313  bool meanStaccCompute() const;
314 
315  bool histCompute () const;
316  unsigned int histNumInternalBins() const;
317 
318  bool cdfStaccCompute () const;
319  unsigned int cdfStaccNumEvalPositions() const;
320 #endif
321 
322 private:
324  void defineMyOptions (po::options_description& optionsDesc) const;
325 
327  void getMyOptionValues(po::options_description& optionsDesc);
328 
329  std::string m_prefix;
330  const BaseEnvironment& m_env;
331  po::options_description* m_optionsDesc;
332 
333  std::string m_option_help;
334  std::string m_option_initialDiscardedPortions;
335 
336  std::string m_option_autoCorr_computeViaDef;
337  std::string m_option_autoCorr_computeViaFft;
338  std::string m_option_autoCorr_secondLag;
339  std::string m_option_autoCorr_lagSpacing;
340  std::string m_option_autoCorr_numLags;
341  std::string m_option_autoCorr_display;
342  std::string m_option_autoCorr_write;
343  std::string m_option_kde_compute;
344  std::string m_option_kde_numEvalPositions;
345  std::string m_option_covMatrix_compute;
346  std::string m_option_corrMatrix_compute;
347 
348 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
349  std::string m_option_mean_monitorPeriod;
350  std::string m_option_bmm_run;
351  std::string m_option_bmm_lengths;
352  std::string m_option_bmm_display;
353  std::string m_option_bmm_write;
354  std::string m_option_fft_compute;
355  std::string m_option_fft_paramId;
356  std::string m_option_fft_size;
357  std::string m_option_fft_testInversion;
358  std::string m_option_fft_write;
359  std::string m_option_psd_compute;
360  std::string m_option_psd_numBlocks;
361  std::string m_option_psd_hopSizeRatio;
362  std::string m_option_psd_paramId;
363  std::string m_option_psd_write;
364  std::string m_option_psdAtZero_compute;
365  std::string m_option_psdAtZero_numBlocks;
366  std::string m_option_psdAtZero_hopSizeRatio;
367  std::string m_option_psdAtZero_display;
368  std::string m_option_psdAtZero_write;
369  std::string m_option_geweke_compute;
370  std::string m_option_geweke_naRatio;
371  std::string m_option_geweke_nbRatio;
372  std::string m_option_geweke_display;
373  std::string m_option_geweke_write;
374  std::string m_option_meanStacc_compute;
375  std::string m_option_hist_compute;
376  std::string m_option_hist_numInternalBins;
377  std::string m_option_cdfStacc_compute;
378  std::string m_option_cdfStacc_numEvalPositions;
379 #endif
380 
381 };
382 
383 std::ostream& operator<<(std::ostream& os, const SequenceStatisticalOptions& obj);
384 
385 #endif // ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
386 
387 #endif // UQ_SEQUENCE_STATISTICAL_OPTIONS_H
388 
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)

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