The interpolant, in the precision of the problem it is used for. More...
#include <Interpolate.h>
The interpolant, in the precision of the problem it is used for.
The parameter is a real type, and names a precision rather than a scalar type: minimising a function presupposes that its values are ordered, so a complex instantiation is meaningless and is rejected below. What varies is how accurately the line search is carried out. Optimize passes value_type_abs, which for a std::complex<double> container is double, and for a long double one is long double – the case this template exists for, since narrowing the function values and gradients to double would cap the line search at double precision however the solver was instantiated.
Classes | |
| struct | point |
Public Types | |
| using | value_t = value_type |
Public Member Functions | |
| Interpolator (point p0, point p1, std::string interpolant="cubic", int verbosity=0) | |
| Construct the interpolant. More... | |
| point | operator() (value_type x) const |
| Evaluate the interpolant and its derivative at a given point. More... | |
| point | minimize (value_type xa, value_type xb, size_t bracket_grid=100, size_t max_bracket_grid=100000, bool analytic=true) const |
| Find the minimum of the interpolant within a range. More... | |
| point | minimize_cubic () const |
| const std::vector< value_type > & | parameters () const |
Static Public Member Functions | |
| static std::vector< std::string > | interpolants () |
| using molpro::linalg::itsolv::Interpolator< value_type >::value_t = value_type |
|
explicit |
Construct the interpolant.
| p0 | Defining point |
| p1 | Defining point |
| interpolant | The interpolation method. An exception is thrown if it is not one of the implemented values. |
| verbosity | Values greater than zero show information on constructing and using the interpolant. |
|
static |
| Interpolator< value_type >::point molpro::linalg::itsolv::Interpolator< value_type >::minimize | ( | value_type | xa, |
| value_type | xb, | ||
| size_t | bracket_grid = 100, |
||
| size_t | max_bracket_grid = 100000, |
||
| bool | analytic = true |
||
| ) | const |
Find the minimum of the interpolant within a range.
| xa | first bound of range |
| xb | second bound of range |
| bracket_grid | number of intervals in |xa-xb|, to be considered in initial bracketing of the minimum. Large values result in many function evaluations, but if set too small in cases of multiple minima, the global minimum may not be found. |
| Interpolator< value_type >::point molpro::linalg::itsolv::Interpolator< value_type >::minimize_cubic |
| Interpolator< value_type >::point molpro::linalg::itsolv::Interpolator< value_type >::operator() | ( | value_type | x | ) | const |
Evaluate the interpolant and its derivative at a given point.
| x |
|
inline |