Skip to content

Commit

Permalink
Additional *Options code cleanup
Browse files Browse the repository at this point in the history
Cleanup more deprecated code related to SequenceStatisticalOptions and
MetropolisHastingsSGOptions

There remains some more unreachable code, but a great many errors crop
up when enabling QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS, so not going
to ferret them all out right now.
  • Loading branch information
briadam committed Oct 5, 2017
1 parent 0b3562a commit 6191701
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1,021 deletions.
866 changes: 3 additions & 863 deletions src/basic/src/SequenceStatisticalOptions.C

Large diffs are not rendered by default.

147 changes: 0 additions & 147 deletions src/basic/src/VectorSequence.C
Original file line number Diff line number Diff line change
Expand Up @@ -667,16 +667,6 @@ BaseVectorSequence<V,M>::copy(const BaseVectorSequence<V,M>& src)
// --------------------------------------------------

#ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
template<class V, class M>
void
BaseVectorSequence<V,M>::computeStatistics(
const SequenceStatisticalOptions& statisticalOptions,
std::ofstream* passedOfs)
{
queso_deprecated();
computeStatistics(statisticalOptions.m_ov, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computeStatistics(
Expand Down Expand Up @@ -877,21 +867,6 @@ BaseVectorSequence<V,M>::computeStatistics(
return;
}
//----------------------------------------------
template<class V, class M>
void
BaseVectorSequence<V,M>::computeMeanVars(
const SequenceStatisticalOptions& statisticalOptions,
std::ofstream* passedOfs,
V* subMeanPtr,
V* subMedianPtr,
V* subSampleVarPtr,
V* subPopulVarPtr)
{
queso_deprecated();
computeMeanVars(statisticalOptions.m_ov, passedOfs, subMeanPtr, subMedianPtr,
subSampleVarPtr, subPopulVarPtr);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computeMeanVars(
Expand Down Expand Up @@ -1088,19 +1063,6 @@ BaseVectorSequence<V,M>::computeMeanVars(
return;
}
//--------------------------------------------------------
template<class V, class M>
void
BaseVectorSequence<V,M>::computeAutoCorrViaDef(
const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
const std::vector<unsigned int>& lagsForCorrs,
std::ofstream* passedOfs)
{
queso_deprecated();
computeAutoCorrViaDef(statisticalOptions.m_ov, initialPosForStatistics,
lagsForCorrs, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computeAutoCorrViaDef(
Expand Down Expand Up @@ -1223,19 +1185,6 @@ BaseVectorSequence<V,M>::computeAutoCorrViaDef(
return;
}
// --------------------------------------------------
template<class V, class M>
void
BaseVectorSequence<V,M>::computeAutoCorrViaFFT(
const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
const std::vector<unsigned int>& lagsForCorrs,
std::ofstream* passedOfs)
{
queso_deprecated();
computeAutoCorrViaFFT(statisticalOptions.m_ov, initialPosForStatistics,
lagsForCorrs, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computeAutoCorrViaFFT(
Expand Down Expand Up @@ -1408,16 +1357,6 @@ BaseVectorSequence<V,M>::computeAutoCorrViaFFT(
return;
}
// --------------------------------------------------
template<class V, class M>
void
BaseVectorSequence<V,M>::computeHistCdfstaccKde( // Use the whole chain
const SequenceStatisticalOptions& statisticalOptions,
std::ofstream* passedOfs)
{
queso_deprecated();
computeHistCdfstaccKde(statisticalOptions.m_ov, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computeHistCdfstaccKde( // Use the whole chain
Expand Down Expand Up @@ -1995,16 +1934,6 @@ BaseVectorSequence<V,M>::computeHistCdfstaccKde( // Use the whole chain
}

// --------------------------------------------------
template<class V, class M>
void
BaseVectorSequence<V,M>::computeCovCorrMatrices( // Use the whole chain
const SequenceStatisticalOptions& statisticalOptions,
std::ofstream* passedOfs)
{
queso_deprecated();
computeCovCorrMatrices(statisticalOptions.m_ov, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computeCovCorrMatrices( // Use the whole chain
Expand Down Expand Up @@ -2075,16 +2004,6 @@ BaseVectorSequence<V,M>::computeCovCorrMatrices( // Use the whole chain
// --------------------------------------------------

#ifdef UQ_CODE_HAS_MONITORS
template<class V, class M>
void
BaseVectorSequence<V,M>::computeMeanEvolution(
const SequenceStatisticalOptions& statisticalOptions,
std::ofstream* passedOfs)
{
queso_deprecated();
computeMeanEvolution(statisticalOptions.m_ov, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computeMeanEvolution(
Expand Down Expand Up @@ -2198,17 +2117,6 @@ BaseVectorSequence<V,M>::computeMeanEvolution(


#ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
template<class V, class M>
void
BaseVectorSequence<V,M>::computeBMM(
const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs)
{
queso_deprecated();
computeMeanStacc(statisticalOptions.m_ov, initialPosForStatistics, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computeMeanStacc(
Expand Down Expand Up @@ -2295,17 +2203,6 @@ BaseVectorSequence<V,M>::computeMeanStacc(
return;
}
// --------------------------------------------------
template<class V, class M>
void
BaseVectorSequence<V,M>::computeFFT(
const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs)
{
queso_deprecated();
computeBMM(statisticalOptions.m_ov, initialPosForStatistics, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computeBMM(
Expand Down Expand Up @@ -2382,17 +2279,6 @@ BaseVectorSequence<V,M>::computeBMM(
return;
}
// --------------------------------------------------
template<class V, class M>
void
BaseVectorSequence<V,M>::computePSD(
const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs)
{
queso_deprecated();
computeFFT(statisticalOptions.m_ov, initialPosForStatistics, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computeFFT(
Expand Down Expand Up @@ -2446,17 +2332,6 @@ BaseVectorSequence<V,M>::computeFFT(
return;
}
// --------------------------------------------------
template<class V, class M>
void
BaseVectorSequence<V,M>::computePSDAtZero(
const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs)
{
queso_deprecated();
computePSD(statisticalOptions.m_ov, initialPosForStatistics, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computePSD(
Expand Down Expand Up @@ -2606,17 +2481,6 @@ BaseVectorSequence<V,M>::computePSD(
return;
}
// --------------------------------------------------
template<class V, class M>
void
BaseVectorSequence<V,M>::computeGeweke(
const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs)
{
queso_deprecated();
computePSDAtZero(statisticalOptions.m_ov, initialPosForStatistics, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computePSDAtZero(
Expand Down Expand Up @@ -2686,17 +2550,6 @@ BaseVectorSequence<V,M>::computePSDAtZero(
return;
}
// --------------------------------------------------
template<class V, class M>
void
BaseVectorSequence<V,M>::computeMeanStacc(
const SequenceStatisticalOptions& statisticalOptions,
const std::vector<unsigned int>& initialPosForStatistics,
std::ofstream* passedOfs)
{
queso_deprecated();
computeGeweke(statisticalOptions.m_ov, initialPosForStatistics, passedOfs);
}

template<class V, class M>
void
BaseVectorSequence<V,M>::computeGeweke(
Expand Down
2 changes: 1 addition & 1 deletion src/core/inc/Environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ file per allowed rank is opened and allowed ranks can be specified through the '
+<item> EnvOptionsValues
+<item> SipOptionsValues
+<item> SfpOptionsValues
+<item> MhOptionsValues (and deprecated MetropolisHastingsSGOptions)
+<item> MhOptionsValues
+<item> McOptionsValues
</list>
The last two classes also rely on
Expand Down
14 changes: 6 additions & 8 deletions src/stats/src/MLSamplingLevelOptions.C
Original file line number Diff line number Diff line change
Expand Up @@ -609,14 +609,12 @@ MLSamplingLevelOptions::scanOptionsValues(const MLSamplingLevelOptions* defaultO
this->getAllOptions();

#ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
if (m_rawChainComputeStats) {
m_rawChainStatisticalOptionsObj = new SequenceStatisticalOptions(m_env,m_prefix + "rawChain_");
m_rawChainStatOptsInstantiated = true;
}
if (m_filteredChainComputeStats) {
m_filteredChainStatisticalOptionsObj = new SequenceStatisticalOptions(m_env,m_prefix + "filteredChain_");
m_filteredChainStatOptsInstantiated = true;
}
// if (m_rawChainComputeStats) {
// m_rawChainStatOptsInstantiated = true;
// }
// if (m_filteredChainComputeStats) {
// m_filteredChainStatOptsInstantiated = true;
// }
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion src/stats/src/MetropolisHastingsSGOptions.C
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ MhOptionsValues::MhOptionsValues(

if ((m_env->subDisplayFile() != NULL ) &&
(m_totallyMute == false)) {
*(m_env->subDisplayFile()) << "In MetropolisHastingsSGOptions::constructor(3)"
*(m_env->subDisplayFile()) << "In MhOptionsValues::constructor(3)"
<< ": after copying values of options with prefix '" << m_prefix
<< "', state of object is:"
<< "\n" << *this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <queso/GslVector.h>
#include <queso/GslMatrix.h>
#include <queso/UniformVectorRV.h>
#include <queso/MetropolisHastingsSGOptions.h>
#include <queso/StatisticalInverseProblem.h>
#include <queso/StatisticalInverseProblemOptions.h>
#include <queso/ScalarFunction.h>
Expand Down

0 comments on commit 6191701

Please sign in to comment.