QMCPolynomial Class Reference

An extension of Polynomial which adds QMC specific functionality. More...

#include <QMCPolynomial.h>

Inheritance diagram for QMCPolynomial:

Polynomial FunctionR1toR1

List of all members.

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 $x$.
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< ComplexgetRoots ()
 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)


Detailed Description

An extension of Polynomial which adds QMC specific functionality.

Definition at line 22 of file QMCPolynomial.h.


Constructor & Destructor Documentation

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.

Parameters:
coeffs set of polynomial coefficients to use for the polynomial.

Definition at line 19 of file QMCPolynomial.cpp.


Member Function Documentation

bool QMCPolynomial::hasNonNegativeZeroes (  ) 

Determines if this polynomial has any non-negative real zeroes.

Returns:
true if the polynomial has a non-negative real zeros and false otherwise.
Exceptions:
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]

void Polynomial::evaluate ( double  x  )  [virtual, inherited]

double Polynomial::getFunctionValue (  )  [virtual, inherited]

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]

double Polynomial::getSecondDerivativeValue (  )  [virtual, inherited]

double Polynomial::getThirdDerivativeValue (  )  [inherited]

double Polynomial::get_p_a ( int  ai  )  [inherited]

double Polynomial::get_p2_xa ( int  ai  )  [inherited]

double Polynomial::get_p3_xxa ( int  ai  )  [inherited]

Array1D< double > Polynomial::getCoefficients (  )  [inherited]

Array1D< Complex > Polynomial::getRoots (  )  [inherited]

Gets the roots of the polynomial.

Returns:
roots of the polynomial.
Exceptions:
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.

Returns:
number of coefficients in 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

\[ P(x) = \sum^{n}_{i=0}c_{i}x^{i} \]

where $n$ is the order of the polynomial and $c_{i}$ is the ith coefficient.

Parameters:
i index of the coefficient to return.
Returns:
ith coefficient of the polynomial.

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]

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().


The documentation for this class was generated from the following files:

Generated on Sat Jul 5 16:14:05 2008 for QMcBeaver by  doxygen 1.5.6