Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retire deprecated Options classes #649

Merged
merged 2 commits into from
Oct 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 0 additions & 186 deletions src/basic/inc/SequenceStatisticalOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,192 +256,6 @@ class SsOptionsValues
void copy(const SsOptionsValues& src);
};

//------------------------------------------------------------------------------------------------

/*!\class SequenceStatisticalOptions
* \brief A templated class that stores statistical options (optionally read from an input file)
*
* A templated class that stores statistical options for a sequence of vectors, e.g.
* a Markov chain, a Monte Carlo input sequence, or a Monte Carlo output sequence.
*/


class SequenceStatisticalOptions
{
public:
//! @name Constructor/Destructor methods
//@{
//! Constructor: reads options from the input file.
/*! It assigns to the variables the identifying strings (prefixes) for a sequence of data
* (scalars; vectors) which had been read from an input file.*/
SequenceStatisticalOptions(const BaseEnvironment& env,
const std::string& prefix);

//! Constructor: with alternative option values.
/*! In this constructor, the input options are given by \c alternativeOptionsValues, thus, they
* are not read from an input file.*/
SequenceStatisticalOptions(const BaseEnvironment& env,
const std::string& prefix,
const SsOptionsValues& alternativeOptionsValues);
//! Destructor
~SequenceStatisticalOptions();
//@}

//! @name Statistical methods
//@{

//! Finds the initially discarded portion of the chain. Access to private attribute m_initialDiscardedPortions
const std::vector<double>& initialDiscardedPortions() const;

//! Compute autocorrelation via definition. Access to private attribute m_autoCorrComputeViaDef
bool autoCorrComputeViaDef() const;

//! Compute autocorrelation via FFT. Access to private attribute m_autoCorrComputeViaFft
bool autoCorrComputeViaFft() const;

//! Returns the second lag of the autocorrelation. Access to private attribute m_autoCorrSecondLag
unsigned int autoCorrSecondLag () const;

//! Returns the spacing of the autocorrelation. Access to private attribute m_autoCorrLagSpacing
unsigned int autoCorrLagSpacing () const;

//! Returns the number of lags of the autocorrelation. Access to private attribute m_autoCorrNumLags
unsigned int autoCorrNumLags () const;

//! Displays autocorrelation. Access to private attribute m_autoCorrDisplay
bool autoCorrDisplay () const;

//! Writes autocorrelation. Access to private attribute m_autoCorrWrite
bool autoCorrWrite () const;

//! Computes KDE. Access to private attribute m_kdeCompute
bool kdeCompute () const;

//! Returns number of evaluation positions for KDE. Access to private attribute m_kdeNumEvalPositions
unsigned int kdeNumEvalPositions() const;

//! Finds the covariance matrix. Access to private attribute m_covMatrixCompute
bool covMatrixCompute () const;

//! Finds the correlation matrix. Access to private attribute m_corrMatrixCompute
bool corrMatrixCompute() const;
//@}

//! @name I/O method
//@{
//! Prints the initial discarded portion of the chain; and, optionally, other attributes of the chain.
void print(std::ostream& os) const;
//@}

//! @name Public attribute
//@{
SsOptionsValues m_ov;
//@}

#ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS

unsigned int meanMonitorPeriod() const;

bool bmmRun () const;
const std::vector<unsigned int>& bmmLengths() const;
bool bmmDisplay() const;
bool bmmWrite () const;

bool fftCompute () const;
unsigned int fftParamId () const;
unsigned int fftSize () const;
bool fftTestInversion() const;
bool fftWrite () const;

bool psdCompute () const;
unsigned int psdNumBlocks () const;
double psdHopSizeRatio() const;
unsigned int psdParamId () const;
bool psdWrite () const;

bool psdAtZeroCompute () const;
const std::vector<unsigned int>& psdAtZeroNumBlocks () const;
double psdAtZeroHopSizeRatio() const;
bool psdAtZeroDisplay () const;
bool psdAtZeroWrite () const;

bool gewekeCompute() const;
double gewekeNaRatio() const;
double gewekeNbRatio() const;
bool gewekeDisplay() const;
bool gewekeWrite () const;

bool meanStaccCompute() const;

bool histCompute () const;
unsigned int histNumInternalBins() const;

bool cdfStaccCompute () const;
unsigned int cdfStaccNumEvalPositions() const;
#endif

private:
//! Defines the options for the chain
void defineMyOptions (boost::program_options::options_description& optionsDesc) const;

//! Reads the chain options
void getMyOptionValues(boost::program_options::options_description& optionsDesc);

std::string m_prefix;
const BaseEnvironment& m_env;
boost::program_options::options_description* m_optionsDesc;

std::string m_option_help;
std::string m_option_initialDiscardedPortions;

std::string m_option_autoCorr_computeViaDef;
std::string m_option_autoCorr_computeViaFft;
std::string m_option_autoCorr_secondLag;
std::string m_option_autoCorr_lagSpacing;
std::string m_option_autoCorr_numLags;
std::string m_option_autoCorr_display;
std::string m_option_autoCorr_write;
std::string m_option_kde_compute;
std::string m_option_kde_numEvalPositions;
std::string m_option_covMatrix_compute;
std::string m_option_corrMatrix_compute;

#ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
std::string m_option_mean_monitorPeriod;
std::string m_option_bmm_run;
std::string m_option_bmm_lengths;
std::string m_option_bmm_display;
std::string m_option_bmm_write;
std::string m_option_fft_compute;
std::string m_option_fft_paramId;
std::string m_option_fft_size;
std::string m_option_fft_testInversion;
std::string m_option_fft_write;
std::string m_option_psd_compute;
std::string m_option_psd_numBlocks;
std::string m_option_psd_hopSizeRatio;
std::string m_option_psd_paramId;
std::string m_option_psd_write;
std::string m_option_psdAtZero_compute;
std::string m_option_psdAtZero_numBlocks;
std::string m_option_psdAtZero_hopSizeRatio;
std::string m_option_psdAtZero_display;
std::string m_option_psdAtZero_write;
std::string m_option_geweke_compute;
std::string m_option_geweke_naRatio;
std::string m_option_geweke_nbRatio;
std::string m_option_geweke_display;
std::string m_option_geweke_write;
std::string m_option_meanStacc_compute;
std::string m_option_hist_compute;
std::string m_option_hist_numInternalBins;
std::string m_option_cdfStacc_compute;
std::string m_option_cdfStacc_numEvalPositions;
#endif

};

std::ostream& operator<<(std::ostream& os, const SequenceStatisticalOptions& obj);

#endif // ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS

Expand Down
44 changes: 0 additions & 44 deletions src/basic/inc/VectorSequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,6 @@ class BaseVectorSequence
#endif //QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS

#ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
void computeHistCdfstaccKde (const SequenceStatisticalOptions& statisticalOptions,
std::ofstream* passedOfs);

void computeStatistics (const SequenceStatisticalOptions& statisticalOptions,
std::ofstream* passedOfs);

void computeHistCdfstaccKde (const SsOptionsValues& statisticalOptions,
std::ofstream* passedOfs);

Expand Down Expand Up @@ -489,33 +483,11 @@ class BaseVectorSequence
virtual void subMeanInter0MonitorFree () = 0;
virtual void unifiedMeanMonitorFree () = 0;

void computeMeanEvolution (const SequenceStatisticalOptions& statisticalOptions,
std::ofstream* passedOfs);

void computeMeanEvolution (const SsOptionsValues& statisticalOptions,
std::ofstream* passedOfs);
#endif

#ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
void computeBMM (const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs);
void computeFFT (const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs);
void computePSD (const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs);
void computePSDAtZero (const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs);
void computeGeweke (const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs);
void computeMeanStacc (const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs);

void computeBMM (const SsOptionsValues& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs);
Expand All @@ -537,22 +509,6 @@ class BaseVectorSequence
#endif

#ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
void computeMeanVars (const SequenceStatisticalOptions& statisticalOptions,
std::ofstream* passedOfs,
V* subMeanPtr,
V* subMedianPtr,
V* subSampleVarPtr,
V* subPopulVarPtr);
void computeAutoCorrViaDef (const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
const std::vector<unsigned int>& lagsForCorrs,
std::ofstream* passedOfs);
void computeAutoCorrViaFFT (const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
const std::vector<unsigned int>& lagsForCorrs,
std::ofstream* passedOfs);
void computeCovCorrMatrices (const SequenceStatisticalOptions& statisticalOptions,
std::ofstream* passedOfs);
void computeMeanVars (const SsOptionsValues& statisticalOptions,
std::ofstream* passedOfs,
V* subMeanPtr,
Expand Down
Loading