#include <Interpolate.h>
Classes | |
struct | point |
Public Member Functions | |
Interpolate (point p0, point p1, std::string interpolant="cubic", int verbosity=0) | |
Construct the interpolant. More... | |
point | operator() (double x) const |
Evaluate the interpolant and its derivative at a given point. More... | |
Interpolate::point | minimize (double xa, double 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... | |
Interpolate::point | minimize_cubic () const |
const std::vector< double > & | parameters () const |
Static Public Member Functions | |
static std::vector< std::string > | interpolants () |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Interpolate &interpolant) |
|
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 |
Interpolate::point Interpolate::minimize | ( | double | xa, |
double | 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. |
Interpolate::point Interpolate::minimize_cubic | ( | ) | const |
Interpolate::point Interpolate::operator() | ( | double | x | ) | const |
Evaluate the interpolant and its derivative at a given point.
x |
|
inline |
|
friend |