#include <QMCPolynomial.h>
Public Member Functions | |
QMCPolynomial () | |
Constructs an uninitialized instance of this class. | |
QMCPolynomial (Array1D< double > &coeffs) | |
Constructs and initializes an intance of this class. | |
bool | hasNonNegativeZeroes () |
Determines if this polynomial has any non-negative real zeroes. | |
void | initialize (Array1D< double > &coeffs) |
Initializes this object. | |
void | evaluate (double x) |
Evaluates the function at . | |
double | getFunctionValue () |
Gets the function value at the last evaluated point. | |
double | getFunctionValue (double x) |
This call doesn't calculate derivatives, only the function. | |
double | getFirstDerivativeValue () |
Gets the function's first deriviate at the last evaluated point. | |
double | getSecondDerivativeValue () |
Gets the function's second deriviative at the last evaluated point. | |
double | getThirdDerivativeValue () |
double | get_p_a (int ai) |
double | get_p2_xa (int ai) |
double | get_p3_xxa (int ai) |
Array1D< double > | getCoefficients () |
This gives us access to the coefficients that this polynomial uses. | |
Array1D< Complex > | getRoots () |
Gets the roots of the polynomial. | |
int | getNumberCoefficients () |
Gets the number of coefficients in the polynomial. | |
double | getCoefficient (int i) |
Gets the ith coefficient of the polynomial. | |
void | print (ostream &strm) |
Write out a string that represents the polynomial. | |
double | Brent_fmin (double ax, double bx, double tol) |
double | function (double x) |
double | minimum (double left, double right) |
Definition at line 22 of file QMCPolynomial.h.
QMCPolynomial::QMCPolynomial | ( | ) |
Constructs an uninitialized instance of this class.
Definition at line 15 of file QMCPolynomial.cpp.
QMCPolynomial::QMCPolynomial | ( | Array1D< double > & | coeffs | ) |
Constructs and initializes an intance of this class.
coeffs | set of polynomial coefficients to use for the polynomial. |
Definition at line 19 of file QMCPolynomial.cpp.
bool QMCPolynomial::hasNonNegativeZeroes | ( | ) |
Determines if this polynomial has any non-negative real zeroes.
true
if the polynomial has a non-negative real zeros and false
otherwise.Exception | if problems were encounted during the calculation. |
Definition at line 23 of file QMCPolynomial.cpp.
References Array1D< T >::dim1(), and Polynomial::getRoots().
Referenced by PadeCorrelationFunction::isSingular(), and FixedCuspPadeCorrelationFunction::isSingular().
void Polynomial::initialize | ( | Array1D< double > & | coeffs | ) | [inherited] |
Initializes this object.
coeffs | set of polynomial coefficients to use for the polynomial. |
Definition at line 65 of file Polynomial.cpp.
References Array1D< T >::allocate(), Polynomial::coefficients, Array1D< T >::dim1(), Polynomial::firstDerivativeCoefficients, Polynomial::secondDerivativeCoefficients, and Polynomial::thirdDerivativeCoefficients.
Referenced by QMCElectronNucleusCuspParameters::calculateSigmaSq(), QMCElectronNucleusCusp::determineRc(), QMCElectronNucleusCuspParameters::fitReplacementOrbital(), PadeCorrelationFunction::initializeParameters(), JuliusCorrelationFunction::initializeParameters(), FixedCuspPadeCorrelationFunction::initializeParameters(), and Cambridge2CorrelationFunction::initializeParameters().
void Polynomial::evaluate | ( | double | x | ) | [virtual, inherited] |
Evaluates the function at .
x | point to evaluate the function. |
Implements FunctionR1toR1.
Definition at line 95 of file Polynomial.cpp.
References Polynomial::evaluatedD2F, Polynomial::evaluatedDF, and Polynomial::evaluatedF.
Referenced by QMCElectronNucleusCuspParameters::calculateLocalEnergy(), QMCElectronNucleusCusp::determineRc(), PadeCorrelationFunction::evaluate(), JuliusCorrelationFunction::evaluate(), FixedCuspPadeCorrelationFunction::evaluate(), Cambridge2CorrelationFunction::evaluate(), QMCElectronNucleusCuspParameters::evaluateReplacementOrbital(), QMCElectronNucleusCuspParameters::findMaxDeviation(), Polynomial::getFunctionValue(), Cambridge2CorrelationFunction::getFunctionValue(), Polynomial::getThirdDerivativeValue(), and QMCElectronNucleusCuspParameters::printParameters().
double Polynomial::getFunctionValue | ( | ) | [virtual, inherited] |
Gets the function value at the last evaluated point.
Implements FunctionR1toR1.
Definition at line 146 of file Polynomial.cpp.
References Polynomial::coefficients, Polynomial::evaluateAll(), Polynomial::evaluatedF, Polynomial::f, and Polynomial::x.
Referenced by QMCElectronNucleusCuspParameters::calculateLocalEnergy(), QMCElectronNucleusCusp::determineRc(), PadeCorrelationFunction::evaluate(), JuliusCorrelationFunction::evaluate(), FixedCuspPadeCorrelationFunction::evaluate(), Cambridge2CorrelationFunction::evaluate(), QMCElectronNucleusCuspParameters::evaluateReplacementOrbital(), QMCElectronNucleusCuspParameters::findMaxDeviation(), FixedCuspPadeCorrelationFunction::get_p2_xa(), FixedCuspPadeCorrelationFunction::get_p3_xxa(), FixedCuspPadeCorrelationFunction::get_p_a(), PadeCorrelationFunction::getFunctionValue(), JuliusCorrelationFunction::getFunctionValue(), FixedCuspPadeCorrelationFunction::getFunctionValue(), Cambridge2CorrelationFunction::getFunctionValue(), and QMCElectronNucleusCuspParameters::printParameters().
double Polynomial::getFunctionValue | ( | double | x | ) | [inherited] |
This call doesn't calculate derivatives, only the function.
It's supposed to be faster than calling evaluate, which does calculate the first 2 derivatives.
Definition at line 157 of file Polynomial.cpp.
References Polynomial::coefficients, and Polynomial::evaluate().
double Polynomial::getFirstDerivativeValue | ( | ) | [virtual, inherited] |
Gets the function's first deriviate at the last evaluated point.
Implements FunctionR1toR1.
Definition at line 167 of file Polynomial.cpp.
References Polynomial::coefficients, Polynomial::df, Polynomial::evaluateAll(), Polynomial::evaluatedDF, and Polynomial::x.
Referenced by QMCElectronNucleusCuspParameters::calculateLocalEnergy(), PadeCorrelationFunction::evaluate(), JuliusCorrelationFunction::evaluate(), FixedCuspPadeCorrelationFunction::evaluate(), Cambridge2CorrelationFunction::evaluate(), QMCElectronNucleusCuspParameters::evaluateReplacementOrbital(), FixedCuspPadeCorrelationFunction::get_p2_xa(), and FixedCuspPadeCorrelationFunction::get_p3_xxa().
double Polynomial::getSecondDerivativeValue | ( | ) | [virtual, inherited] |
Gets the function's second deriviative at the last evaluated point.
Implements FunctionR1toR1.
Definition at line 184 of file Polynomial.cpp.
References Polynomial::coefficients, Polynomial::d2f, Polynomial::evaluateAll(), Polynomial::evaluatedD2F, and Polynomial::x.
Referenced by QMCElectronNucleusCuspParameters::calculateLocalEnergy(), PadeCorrelationFunction::evaluate(), JuliusCorrelationFunction::evaluate(), FixedCuspPadeCorrelationFunction::evaluate(), Cambridge2CorrelationFunction::evaluate(), QMCElectronNucleusCuspParameters::evaluateReplacementOrbital(), and FixedCuspPadeCorrelationFunction::get_p3_xxa().
double Polynomial::getThirdDerivativeValue | ( | ) | [inherited] |
Definition at line 195 of file Polynomial.cpp.
References Polynomial::d3f, Polynomial::evaluate(), Polynomial::thirdDerivativeCoefficients, and Polynomial::x.
Referenced by Cambridge2CorrelationFunction::evaluate().
double Polynomial::get_p_a | ( | int | ai | ) | [inherited] |
Definition at line 162 of file Polynomial.cpp.
References Polynomial::x.
Referenced by FixedCuspPadeCorrelationFunction::get_p2_xa(), Cambridge2CorrelationFunction::get_p2_xa(), FixedCuspPadeCorrelationFunction::get_p3_xxa(), Cambridge2CorrelationFunction::get_p3_xxa(), FixedCuspPadeCorrelationFunction::get_p_a(), and Cambridge2CorrelationFunction::get_p_a().
double Polynomial::get_p2_xa | ( | int | ai | ) | [inherited] |
Definition at line 178 of file Polynomial.cpp.
References Polynomial::x.
Referenced by FixedCuspPadeCorrelationFunction::get_p2_xa(), Cambridge2CorrelationFunction::get_p2_xa(), FixedCuspPadeCorrelationFunction::get_p3_xxa(), and Cambridge2CorrelationFunction::get_p3_xxa().
double Polynomial::get_p3_xxa | ( | int | ai | ) | [inherited] |
Definition at line 202 of file Polynomial.cpp.
References Polynomial::x.
Referenced by FixedCuspPadeCorrelationFunction::get_p3_xxa(), and Cambridge2CorrelationFunction::get_p3_xxa().
Array1D< double > Polynomial::getCoefficients | ( | ) | [inherited] |
This gives us access to the coefficients that this polynomial uses.
Reimplemented in PowerSeries.
Definition at line 217 of file Polynomial.cpp.
References Polynomial::coefficients.
Referenced by QMCElectronNucleusCuspParameters::calculateSigmaSq(), PadeCorrelationFunction::getDenominatorCoeffs(), FixedCuspPadeCorrelationFunction::getDenominatorCoeffs(), Cambridge2CorrelationFunction::getDenominatorCoeffs(), PadeCorrelationFunction::getNumeratorCoeffs(), JuliusCorrelationFunction::getNumeratorCoeffs(), FixedCuspPadeCorrelationFunction::getNumeratorCoeffs(), Cambridge2CorrelationFunction::getNumeratorCoeffs(), and QMCElectronNucleusCuspParameters::printParameters().
Gets the roots of the polynomial.
Exception | if problems were encounted during the root calculation. |
If the highest order terms have 0 for a coefficient, then we have fewer roots.
Definition at line 243 of file Polynomial.cpp.
References Polynomial::coefficients, Array1D< T >::dim1(), and Polynomial::zroots().
Referenced by QMCElectronNucleusCuspParameters::calculateSigmaSq(), PadeCorrelationFunction::getPoles(), FixedCuspPadeCorrelationFunction::getPoles(), and hasNonNegativeZeroes().
int Polynomial::getNumberCoefficients | ( | ) | [inherited] |
Gets the number of coefficients in the polynomial.
This is one larger than the order of the polynomial.
Reimplemented in PowerSeries.
Definition at line 207 of file Polynomial.cpp.
References Polynomial::coefficients, and Array1D< T >::dim1().
Referenced by FixedCuspPadeCorrelationFunction::get_p2_xa(), FixedCuspPadeCorrelationFunction::get_p3_xxa(), and FixedCuspPadeCorrelationFunction::get_p_a().
double Polynomial::getCoefficient | ( | int | i | ) | [inherited] |
Gets the ith coefficient of the polynomial.
Where the polynomial is defined such that
where is the order of the polynomial and is the ith coefficient.
i | index of the coefficient to return. |
Reimplemented in PowerSeries.
Definition at line 212 of file Polynomial.cpp.
References Polynomial::coefficients.
void Polynomial::print | ( | ostream & | strm | ) | [inherited] |
Write out a string that represents the polynomial.
Reimplemented in PowerSeries.
Definition at line 222 of file Polynomial.cpp.
References Polynomial::coefficients, and Array1D< T >::dim1().
Referenced by operator<<(), and FixedCuspPadeCorrelationFunction::print().
double FunctionR1toR1::Brent_fmin | ( | double | ax, | |
double | bx, | |||
double | tol | |||
) | [inherited] |
Definition at line 81 of file FunctionR1toR1.cpp.
References FunctionR1toR1::function().
Referenced by FunctionR1toR1::minimum().
double FunctionR1toR1::function | ( | double | x | ) | [inherited] |
Definition at line 209 of file FunctionR1toR1.cpp.
References FunctionR1toR1::evaluate(), and FunctionR1toR1::getFunctionValue().
Referenced by FunctionR1toR1::Brent_fmin(), and QMCEigenSearch::get_a_diag().
double FunctionR1toR1::minimum | ( | double | left, | |
double | right | |||
) | [inherited] |
Definition at line 215 of file FunctionR1toR1.cpp.
References FunctionR1toR1::Brent_fmin().
Referenced by QMCEigenSearch::get_a_diag().