#include <QMCObjectiveFunctionResult.h>
Public Member Functions | |
QMCObjectiveFunctionResult () | |
Creates a new uninitialized instance of this class. | |
~QMCObjectiveFunctionResult () | |
QMCObjectiveFunctionResult (QMCInput *input, double energyAve, double energyVar, double logWeightAve, double logWeightVar, int numSamples, Array1D< Complex > &poles) | |
Creates and initializes a new instance of this class. | |
QMCObjectiveFunctionResult (QMCObjectiveFunctionResult &rhs) | |
Creates a new instance of this class and makes it equivalent to another instance of this class. | |
double | getLogWeightsAve () |
Gets the average value of the natural log of the statistical weights for the configurations used in this function evaluation. | |
double | getLogWeightsVar () |
Gets the variance of the natural log of the statistical weights for the configurations used in this function evaluation. | |
double | getEnergyAve () const |
Gets the calculated average energy value. | |
double | getEnergyVar () const |
Gets the calculated energy variance. | |
int | getNumberSamples () const |
double | getScore () const |
Gets a score for this function evaluation. | |
double | getDerivativeScore () |
Gets a score for this function evaluation that is to be used in calculating the derivative in a numerical optimization. | |
void | operator= (const QMCObjectiveFunctionResult &rhs) |
Sets two QMCObjectiveFunctionResult objects equal. | |
Private Member Functions | |
void | set_log_weights_ave (double wa) |
void | set_log_weights_var (double wv) |
void | set_energy_ave (double ea) |
void | set_energy_var (double ev) |
void | set_score (Array1D< Complex > &poles) |
void | set_score_for_derivative (Array1D< Complex > &poles) |
double | mikes_score_function () |
double | mikes_penalty (double x) |
double | mikes_penalty_scaler (double x) |
double | calculate_monkey_spank () |
double | calculate_umrigar88 () |
Private Attributes | |
int | numSamples |
double | log_weights_ave |
double | log_weights_var |
double | energy_ave |
double | energy_var |
double | score |
double | score_for_derivative |
QMCInput * | Input |
Friends | |
ostream & | operator<< (ostream &strm, const QMCObjectiveFunctionResult &rhs) |
Prints the contents of this object in a human readable format. |
These results can then be used for numerical optimization or other functions.
Definition at line 29 of file QMCObjectiveFunctionResult.h.
QMCObjectiveFunctionResult::QMCObjectiveFunctionResult | ( | ) |
Creates a new uninitialized instance of this class.
Definition at line 15 of file QMCObjectiveFunctionResult.cpp.
QMCObjectiveFunctionResult::~QMCObjectiveFunctionResult | ( | ) |
QMCObjectiveFunctionResult::QMCObjectiveFunctionResult | ( | QMCInput * | input, | |
double | energyAve, | |||
double | energyVar, | |||
double | logWeightAve, | |||
double | logWeightVar, | |||
int | numSamples, | |||
Array1D< Complex > & | poles | |||
) |
Creates and initializes a new instance of this class.
input | data input to control the calculation. | |
energyAve | calculated energy value | |
energyVar | calculated energy variance | |
logWeightAve | average value of the natural log of the statistical weights of the configurations. | |
logWeightVar | variance in the above quantity. | |
poles | of the correlation functions |
Definition at line 24 of file QMCObjectiveFunctionResult.cpp.
References Input, set_energy_ave(), set_energy_var(), set_log_weights_ave(), set_log_weights_var(), set_score(), and set_score_for_derivative().
QMCObjectiveFunctionResult::QMCObjectiveFunctionResult | ( | QMCObjectiveFunctionResult & | rhs | ) |
Creates a new instance of this class and makes it equivalent to another instance of this class.
rhs | object to set this equal to. |
Definition at line 42 of file QMCObjectiveFunctionResult.cpp.
double QMCObjectiveFunctionResult::getLogWeightsAve | ( | ) |
Gets the average value of the natural log of the statistical weights for the configurations used in this function evaluation.
Definition at line 48 of file QMCObjectiveFunctionResult.cpp.
References log_weights_ave.
Referenced by operator<<().
double QMCObjectiveFunctionResult::getLogWeightsVar | ( | ) |
Gets the variance of the natural log of the statistical weights for the configurations used in this function evaluation.
Definition at line 53 of file QMCObjectiveFunctionResult.cpp.
References log_weights_var.
Referenced by operator<<().
double QMCObjectiveFunctionResult::getEnergyAve | ( | ) | const |
Gets the calculated average energy value.
Definition at line 58 of file QMCObjectiveFunctionResult.cpp.
References energy_ave.
Referenced by calculate_umrigar88(), operator<<(), set_score(), and set_score_for_derivative().
double QMCObjectiveFunctionResult::getEnergyVar | ( | ) | const |
Gets the calculated energy variance.
Definition at line 63 of file QMCObjectiveFunctionResult.cpp.
References energy_var.
Referenced by calculate_umrigar88(), operator<<(), set_score(), and set_score_for_derivative().
int QMCObjectiveFunctionResult::getNumberSamples | ( | ) | const |
Definition at line 68 of file QMCObjectiveFunctionResult.cpp.
References numSamples.
Referenced by operator<<().
double QMCObjectiveFunctionResult::getScore | ( | ) | const |
Gets a score for this function evaluation.
Better scores have lower values. The algorithm used for arriving at the scoris is determined by the input data. The convergence of a numerical optimization can be modified by changing the score functions.
Definition at line 73 of file QMCObjectiveFunctionResult.cpp.
References score.
Referenced by QMCWolfeStepLengthSelector::calculateLineSearchObjectiveFunction(), ParameterScorePair::getScore(), operator<<(), and QMCLineSearch::optimize().
double QMCObjectiveFunctionResult::getDerivativeScore | ( | ) |
Gets a score for this function evaluation that is to be used in calculating the derivative in a numerical optimization.
The algorithm used for arriving at this score is determined by the input data. The convergence of a numerical optimization can be modified by changing the score functions.
Definition at line 78 of file QMCObjectiveFunctionResult.cpp.
References score_for_derivative.
Referenced by operator<<().
void QMCObjectiveFunctionResult::operator= | ( | const QMCObjectiveFunctionResult & | rhs | ) |
Sets two QMCObjectiveFunctionResult objects equal.
rhs | object to set this object equal to. |
Definition at line 155 of file QMCObjectiveFunctionResult.cpp.
References energy_ave, energy_var, Input, log_weights_ave, log_weights_var, numSamples, score, and score_for_derivative.
void QMCObjectiveFunctionResult::set_log_weights_ave | ( | double | wa | ) | [private] |
Definition at line 83 of file QMCObjectiveFunctionResult.cpp.
References IeeeMath::isNaN(), log_weights_ave, and MAX_RESULT_VALUE.
Referenced by QMCObjectiveFunctionResult().
void QMCObjectiveFunctionResult::set_log_weights_var | ( | double | wv | ) | [private] |
Definition at line 99 of file QMCObjectiveFunctionResult.cpp.
References IeeeMath::isNaN(), log_weights_var, and MAX_RESULT_VALUE.
Referenced by QMCObjectiveFunctionResult().
void QMCObjectiveFunctionResult::set_energy_ave | ( | double | ea | ) | [private] |
Definition at line 119 of file QMCObjectiveFunctionResult.cpp.
References energy_ave, IeeeMath::isNaN(), and MAX_RESULT_VALUE.
Referenced by QMCObjectiveFunctionResult().
void QMCObjectiveFunctionResult::set_energy_var | ( | double | ev | ) | [private] |
Definition at line 135 of file QMCObjectiveFunctionResult.cpp.
References energy_var, IeeeMath::isNaN(), and MAX_RESULT_VALUE.
Referenced by QMCObjectiveFunctionResult().
Definition at line 167 of file QMCObjectiveFunctionResult.cpp.
References calculate_monkey_spank(), QMCJastrowParameters::calculate_penalty_function(), calculate_umrigar88(), QMCInput::flags, getEnergyAve(), getEnergyVar(), Input, QMCFlags::optimize_Psi_criteria, score, and QMCFlags::singularity_penalty_function_parameter.
Referenced by QMCObjectiveFunctionResult().
Definition at line 200 of file QMCObjectiveFunctionResult.cpp.
References calculate_monkey_spank(), QMCJastrowParameters::calculate_penalty_function(), calculate_umrigar88(), QMCInput::flags, getEnergyAve(), getEnergyVar(), Input, QMCFlags::numerical_derivative_surface, score_for_derivative, and QMCFlags::singularity_penalty_function_parameter.
Referenced by QMCObjectiveFunctionResult().
double QMCObjectiveFunctionResult::mikes_score_function | ( | ) | [private] |
Definition at line 236 of file QMCObjectiveFunctionResult.cpp.
References energy_var, QMCInput::flags, Input, log_weights_var, mikes_penalty(), mikes_penalty_scaler(), and QMCFlags::optimize_Psi_barrier_parameter.
Referenced by calculate_monkey_spank().
double QMCObjectiveFunctionResult::mikes_penalty | ( | double | x | ) | [private] |
Definition at line 290 of file QMCObjectiveFunctionResult.cpp.
Referenced by mikes_score_function().
double QMCObjectiveFunctionResult::mikes_penalty_scaler | ( | double | x | ) | [private] |
Definition at line 302 of file QMCObjectiveFunctionResult.cpp.
References IeeeMath::isNaN().
Referenced by mikes_score_function().
double QMCObjectiveFunctionResult::calculate_monkey_spank | ( | ) | [private] |
Definition at line 325 of file QMCObjectiveFunctionResult.cpp.
References mikes_score_function().
Referenced by set_score(), and set_score_for_derivative().
double QMCObjectiveFunctionResult::calculate_umrigar88 | ( | ) | [private] |
Definition at line 331 of file QMCObjectiveFunctionResult.cpp.
References QMCFlags::energy_estimated, QMCInput::flags, getEnergyAve(), getEnergyVar(), and Input.
Referenced by set_score(), and set_score_for_derivative().
ostream& operator<< | ( | ostream & | strm, | |
const QMCObjectiveFunctionResult & | rhs | |||
) | [friend] |
Prints the contents of this object in a human readable format.
int QMCObjectiveFunctionResult::numSamples [private] |
Definition at line 130 of file QMCObjectiveFunctionResult.h.
Referenced by getNumberSamples(), and operator=().
double QMCObjectiveFunctionResult::log_weights_ave [private] |
Definition at line 131 of file QMCObjectiveFunctionResult.h.
Referenced by getLogWeightsAve(), operator=(), and set_log_weights_ave().
double QMCObjectiveFunctionResult::log_weights_var [private] |
Definition at line 132 of file QMCObjectiveFunctionResult.h.
Referenced by getLogWeightsVar(), mikes_score_function(), operator=(), and set_log_weights_var().
double QMCObjectiveFunctionResult::energy_ave [private] |
Definition at line 133 of file QMCObjectiveFunctionResult.h.
Referenced by getEnergyAve(), operator=(), and set_energy_ave().
double QMCObjectiveFunctionResult::energy_var [private] |
Definition at line 134 of file QMCObjectiveFunctionResult.h.
Referenced by getEnergyVar(), mikes_score_function(), operator=(), and set_energy_var().
double QMCObjectiveFunctionResult::score [private] |
Definition at line 136 of file QMCObjectiveFunctionResult.h.
Referenced by getScore(), operator=(), and set_score().
double QMCObjectiveFunctionResult::score_for_derivative [private] |
Definition at line 137 of file QMCObjectiveFunctionResult.h.
Referenced by getDerivativeScore(), operator=(), and set_score_for_derivative().
QMCInput* QMCObjectiveFunctionResult::Input [private] |
Definition at line 139 of file QMCObjectiveFunctionResult.h.
Referenced by calculate_umrigar88(), mikes_score_function(), operator=(), QMCObjectiveFunctionResult(), set_score(), set_score_for_derivative(), and ~QMCObjectiveFunctionResult().