25 #ifndef UQ_SEQUENCE_STATISTICAL_OPTIONS_H 
   26 #define UQ_SEQUENCE_STATISTICAL_OPTIONS_H 
   28 #include <queso/Defines.h> 
   30 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS 
   32 #include <queso/Environment.h> 
   33 #include <queso/BoostInputOptionsParser.h> 
   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 
   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 
   81   namespace program_options {
 
   82     class options_description;
 
  105   SsOptionsValues(
const BaseEnvironment * env, 
const char * prefix);
 
  109   SsOptionsValues            (
const SsOptionsValues& src);
 
  112   virtual ~SsOptionsValues            ();
 
  117   SsOptionsValues& operator= (
const SsOptionsValues& rhs);
 
  124   std::string               m_prefix;
 
  127   std::vector<double>       m_initialDiscardedPortions;
 
  130   bool                      m_autoCorrComputeViaDef;
 
  133   bool                      m_autoCorrComputeViaFft;
 
  136   unsigned int              m_autoCorrSecondLag;
 
  139   unsigned int              m_autoCorrLagSpacing;
 
  142   unsigned int              m_autoCorrNumLags;
 
  145   bool                      m_autoCorrDisplay;
 
  148   bool                      m_autoCorrWrite;
 
  154   unsigned int              m_kdeNumEvalPositions;
 
  157   bool                      m_covMatrixCompute;
 
  160   bool                      m_corrMatrixCompute;
 
  162 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS 
  163   unsigned int              m_meanMonitorPeriod;
 
  166   std::vector<unsigned int> m_bmmLengths;
 
  171   unsigned int              m_fftParamId;
 
  172   unsigned int              m_fftSize;
 
  173   bool                      m_fftTestInversion;
 
  177   unsigned int              m_psdNumBlocks;
 
  178   double                    m_psdHopSizeRatio;
 
  179   unsigned int              m_psdParamId;
 
  182   bool                      m_psdAtZeroCompute;
 
  183   std::vector<unsigned int> m_psdAtZeroNumBlocks;
 
  184   double                    m_psdAtZeroHopSizeRatio;
 
  185   bool                      m_psdAtZeroDisplay;
 
  186   bool                      m_psdAtZeroWrite;
 
  188   bool                      m_gewekeCompute;
 
  189   double                    m_gewekeNaRatio;
 
  190   double                    m_gewekeNbRatio;
 
  191   bool                      m_gewekeDisplay;
 
  194   bool                      m_meanStaccCompute;
 
  197   unsigned int              m_histNumInternalBins;
 
  199   bool                      m_cdfStaccCompute;
 
  200   unsigned int              m_cdfStaccNumEvalPositions;
 
  205   BoostInputOptionsParser * m_parser;
 
  207   std::string                   m_option_help;
 
  208   std::string                   m_option_initialDiscardedPortions;
 
  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;
 
  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;
 
  256   void copy(
const SsOptionsValues& src);
 
  269 class SequenceStatisticalOptions
 
  277   SequenceStatisticalOptions(
const BaseEnvironment& env,
 
  278                                     const std::string&            prefix);
 
  283   SequenceStatisticalOptions(
const BaseEnvironment& env,
 
  284                                     const std::string&            prefix,
 
  285                                     const SsOptionsValues& alternativeOptionsValues);
 
  287   ~SequenceStatisticalOptions();
 
  294   const std::vector<double>&       initialDiscardedPortions() 
const;
 
  297   bool                       autoCorrComputeViaDef() 
const;
 
  300   bool                       autoCorrComputeViaFft() 
const;
 
  303   unsigned int               autoCorrSecondLag    () 
const;
 
  306   unsigned int               autoCorrLagSpacing   () 
const;
 
  309   unsigned int               autoCorrNumLags      () 
const;
 
  312   bool                       autoCorrDisplay      () 
const;
 
  315   bool                       autoCorrWrite        () 
const;
 
  318   bool                       kdeCompute         () 
const;
 
  321   unsigned int               kdeNumEvalPositions() 
const;
 
  324   bool                       covMatrixCompute () 
const;
 
  327   bool                       corrMatrixCompute() 
const;
 
  332   void                       print(std::ostream& os) 
const;
 
  338   SsOptionsValues     m_ov;
 
  341 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS 
  343         unsigned int               meanMonitorPeriod() 
const;
 
  345         bool                       bmmRun    () 
const;
 
  346   const std::vector<unsigned int>& bmmLengths() 
const;
 
  347         bool                       bmmDisplay() 
const;
 
  348         bool                       bmmWrite  () 
const;
 
  350         bool                       fftCompute      () 
const;
 
  351         unsigned int               fftParamId      () 
const;
 
  352         unsigned int               fftSize         () 
const;
 
  353         bool                       fftTestInversion() 
const;
 
  354         bool                       fftWrite        () 
const;
 
  356         bool                       psdCompute     () 
const;
 
  357         unsigned int               psdNumBlocks   () 
const;
 
  358         double                     psdHopSizeRatio() 
const;
 
  359         unsigned int               psdParamId     () 
const;
 
  360         bool                       psdWrite       () 
const;
 
  362         bool                       psdAtZeroCompute     () 
const;
 
  363   const std::vector<unsigned int>& psdAtZeroNumBlocks   () 
const;
 
  364         double                     psdAtZeroHopSizeRatio() 
const;
 
  365         bool                       psdAtZeroDisplay     () 
const;
 
  366         bool                       psdAtZeroWrite       () 
const;
 
  368         bool                       gewekeCompute() 
const;
 
  369         double                     gewekeNaRatio() 
const;
 
  370         double                     gewekeNbRatio() 
const;
 
  371         bool                       gewekeDisplay() 
const;
 
  372         bool                       gewekeWrite  () 
const;
 
  374         bool                       meanStaccCompute() 
const;
 
  376         bool                       histCompute        () 
const;
 
  377         unsigned int               histNumInternalBins() 
const;
 
  379         bool                       cdfStaccCompute         () 
const;
 
  380         unsigned int               cdfStaccNumEvalPositions() 
const;
 
  385   void   defineMyOptions  (boost::program_options::options_description& optionsDesc) 
const;
 
  388   void   getMyOptionValues(boost::program_options::options_description& optionsDesc);
 
  390   std::string                   m_prefix;
 
  391   const BaseEnvironment& m_env;
 
  392   boost::program_options::options_description*      m_optionsDesc;
 
  394   std::string                   m_option_help;
 
  395   std::string                   m_option_initialDiscardedPortions;
 
  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;
 
  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;
 
  444 std::ostream& 
operator<<(std::ostream& os, 
const SequenceStatisticalOptions& obj);
 
  446 #endif // ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS 
  448 #endif // UQ_SEQUENCE_STATISTICAL_OPTIONS_H 
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