) cubic spline interpolation with a grid that is assumed to be spaced according to a geometric relationship for faster evaluation.
More...
#include <CubicSplineWithGeometricProgressionGrid.h>

Public Member Functions | |
| CubicSplineWithGeometricProgressionGrid () | |
| Constructs an uninitialized spline. | |
| void | setGridParameters (double x0, double beta) |
Sets the value for and used in generating this grid. | |
| void | evaluate (double x) |
Evaluates the function at . | |
| void | operator= (const CubicSplineWithGeometricProgressionGrid &rhs) |
| Sets two CubicSplineWithGeometricProgressionGrid objects equal. | |
| void | initializeWithFunctionValues (const Array1D< double > &xInput, const Array1D< double > &yInput, double yPrimeFirst, double yPrimeLast) |
| Initializes the spline with the function values at given points plus the derivative values at the end points. | |
| void | initializeWithDerivativeValues (const Array1D< double > &xInput, const Array1D< double > &yPrimeInput, double yFirst) |
| Initializes the spline with the derivative values at given points plus the function value at the first point. | |
| double | getFunctionValue () |
| Gets the function value at the last evaluated point. | |
| 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 | integrate (int indexStart, int indexStop) |
| This function will integrate the spline between two indices. | |
| void | toXML (ostream &strm) |
| Writes the state of this object to an XML stream. | |
| double | Brent_fmin (double ax, double bx, double tol) |
| double | function (double x) |
| double | minimum (double left, double right) |
Protected Member Functions | |
| void | evaluate (double x, int index) |
Evaluate the function at when the index of the box of the domain containing is known. | |
Private Attributes | |
| double | x0 |
| double | inverselnbeta |
| {1}{ln()} | |
Friends | |
| ostream & | operator<< (ostream &strm, CubicSpline &rhs) |
| Writes the state of this object to an XML stream. | |
) cubic spline interpolation with a grid that is assumed to be spaced according to a geometric relationship for faster evaluation.
is set equal to the first datum used to initialize the spline.
Definition at line 29 of file CubicSplineWithGeometricProgressionGrid.h.
| CubicSplineWithGeometricProgressionGrid::CubicSplineWithGeometricProgressionGrid | ( | ) |
Constructs an uninitialized spline.
Definition at line 16 of file CubicSplineWithGeometricProgressionGrid.cpp.
References inverselnbeta, and x0.
| void CubicSplineWithGeometricProgressionGrid::setGridParameters | ( | double | x0, | |
| double | beta | |||
| ) |
Sets the value for and
used in generating this grid.
| x0 | the first point in the grid . |
Definition at line 22 of file CubicSplineWithGeometricProgressionGrid.cpp.
References inverselnbeta.
Referenced by QMCBasisFunction::initializeInterpolation().
| void CubicSplineWithGeometricProgressionGrid::evaluate | ( | double | x | ) | [virtual] |
Evaluates the function at
.
| x | point to evaluate the function. |
Reimplemented from CubicSpline.
Definition at line 29 of file CubicSplineWithGeometricProgressionGrid.cpp.
References CubicSpline::evaluate(), inverselnbeta, and x0.
| void CubicSplineWithGeometricProgressionGrid::operator= | ( | const CubicSplineWithGeometricProgressionGrid & | rhs | ) |
Sets two CubicSplineWithGeometricProgressionGrid objects equal.
| rhs | object to set this object equal to |
Definition at line 38 of file CubicSplineWithGeometricProgressionGrid.cpp.
References inverselnbeta, CubicSpline::operator=(), and x0.
| void CubicSpline::initializeWithFunctionValues | ( | const Array1D< double > & | xInput, | |
| const Array1D< double > & | yInput, | |||
| double | yPrimeFirst, | |||
| double | yPrimeLast | |||
| ) | [inherited] |
Initializes the spline with the function values at given points plus the derivative values at the end points.
| xInput | x values of the given points. | |
| yInput | y values of the given points. | |
| yPrimeFirst | derivative value at the first point. | |
| yPrimeLast | derivative value at the last point. |
Definition at line 37 of file CubicSpline.cpp.
References CubicSpline::a0_list, CubicSpline::a1_list, CubicSpline::a2_list, CubicSpline::a3_list, Array1D< T >::allocate(), CubicSpline::col_rhs, Array1D< T >::dim1(), CubicSpline::n, CubicSpline::row_left, CubicSpline::row_middle, CubicSpline::row_right, CubicSpline::solve_tridiagonal_system(), CubicSpline::x_list, CubicSpline::y_list, CubicSpline::yp0, CubicSpline::yp_list, and CubicSpline::ypend.
Referenced by QMCNuclearForces::calcCoefficients(), QMCEigenSearch::get_a_diag(), QMCNuclearForces::initialize(), and QMCBasisFunction::initializeInterpolation().
| void CubicSpline::initializeWithDerivativeValues | ( | const Array1D< double > & | xInput, | |
| const Array1D< double > & | yPrimeInput, | |||
| double | yFirst | |||
| ) | [inherited] |
Initializes the spline with the derivative values at given points plus the function value at the first point.
| xInput | x values of the given points. | |
| yPrimeInput | derivative values of the given points. | |
| yFirst | function value at the first point. |
Definition at line 159 of file CubicSpline.cpp.
References CubicSpline::a0_list, CubicSpline::a1_list, CubicSpline::a2_list, CubicSpline::a3_list, Array1D< T >::allocate(), CubicSpline::col_rhs, Array1D< T >::dim1(), CubicSpline::n, CubicSpline::row_left, CubicSpline::row_middle, CubicSpline::row_right, CubicSpline::solve_tridiagonal_system2(), CubicSpline::x_list, CubicSpline::y0, CubicSpline::y_list, and CubicSpline::yp_list.
| void CubicSpline::evaluate | ( | double | x, | |
| int | index | |||
| ) | [protected, inherited] |
Evaluate the function at
when the index of the box of the domain containing
is known.
| x | point to evaluate the function. | |
| index | index of the box of the domain containing x. |
Definition at line 424 of file CubicSpline.cpp.
References a0, CubicSpline::a0_list, CubicSpline::a1_list, CubicSpline::a2_list, CubicSpline::a3_list, CubicSpline::ddfddx, CubicSpline::dfdx, CubicSpline::f, CubicSpline::n, and CubicSpline::x_list.
| double CubicSpline::getFunctionValue | ( | ) | [virtual, inherited] |
Gets the function value at the last evaluated point.
Implements FunctionR1toR1.
Definition at line 454 of file CubicSpline.cpp.
References CubicSpline::f.
Referenced by QMCNuclearForces::initialize().
| double CubicSpline::getFirstDerivativeValue | ( | ) | [virtual, inherited] |
Gets the function's first deriviate at the last evaluated point.
Implements FunctionR1toR1.
Definition at line 459 of file CubicSpline.cpp.
References CubicSpline::dfdx.
| double CubicSpline::getSecondDerivativeValue | ( | ) | [virtual, inherited] |
Gets the function's second deriviative at the last evaluated point.
Implements FunctionR1toR1.
Definition at line 464 of file CubicSpline.cpp.
References CubicSpline::ddfddx.
| double CubicSpline::integrate | ( | int | indexStart, | |
| int | indexStop | |||
| ) | [inherited] |
This function will integrate the spline between two indices.
| indexStart | ||
| indexStop |
Definition at line 392 of file CubicSpline.cpp.
References a0, CubicSpline::a0_list, CubicSpline::a1_list, CubicSpline::a2_list, CubicSpline::a3_list, CubicSpline::n, and CubicSpline::x_list.
Referenced by QMCNuclearForces::calcCoefficients(), and QMCNuclearForces::initialize().
| void CubicSpline::toXML | ( | ostream & | strm | ) | [inherited] |
Writes the state of this object to an XML stream.
| strm | XML stream |
Definition at line 469 of file CubicSpline.cpp.
References CubicSpline::a0_list, CubicSpline::a1_list, CubicSpline::a2_list, CubicSpline::a3_list, CubicSpline::ddfddx, CubicSpline::dfdx, Array1D< T >::dim1(), CubicSpline::f, CubicSpline::x_list, CubicSpline::y_list, and CubicSpline::yp_list.
Referenced by operator<<().
| 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().
| ostream& operator<< | ( | ostream & | strm, | |
| CubicSpline & | rhs | |||
| ) | [friend, inherited] |
double CubicSplineWithGeometricProgressionGrid::x0 [private] |
Definition at line 59 of file CubicSplineWithGeometricProgressionGrid.h.
Referenced by CubicSplineWithGeometricProgressionGrid(), evaluate(), and operator=().
double CubicSplineWithGeometricProgressionGrid::inverselnbeta [private] |
{1}{ln()}
Definition at line 64 of file CubicSplineWithGeometricProgressionGrid.h.
Referenced by CubicSplineWithGeometricProgressionGrid(), evaluate(), operator=(), and setGridParameters().
1.5.6