1#ifndef LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_INTERPOLATE_H_
2#define LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_INTERPOLATE_H_
17 double f = std::nan(
"unset");
18 double f1 = std::nan(
"unset");
19 double f2 = std::nan(
"unset");
46 Interpolate::point minimize(
double xa,
double xb,
size_t bracket_grid = 100,
size_t max_bracket_grid = 100000,
bool analytic=
true)
const;
50 const std::vector<double>&
parameters()
const {
return m_parameters; }
54 const point m_p0, m_p1;
55 const std::string m_interpolant;
56 double m_c0, m_c1, m_c2, m_c3;
57 std::vector<double> m_parameters;
61 return lhs.
x == rhs.x && lhs.
f == rhs.f && lhs.
f1 == rhs.f1;
63std::ostream&
operator<<(std::ostream& os,
const Interpolate& interpolant);
64std::ostream&
operator<<(std::ostream& os,
const Interpolate::point& p);
Definition: Interpolate.h:13
static std::vector< std::string > interpolants()
Definition: Interpolate.cpp:99
const std::vector< double > & parameters() const
Definition: Interpolate.h:50
friend std::ostream & operator<<(std::ostream &os, const Interpolate &interpolant)
point operator()(double x) const
Evaluate the interpolant and its derivative at a given point.
Definition: Interpolate.cpp:101
Interpolate(point p0, point p1, std::string interpolant="cubic", int verbosity=0)
Construct the interpolant.
Definition: Interpolate.cpp:51
Interpolate::point minimize_cubic() const
Definition: Interpolate.cpp:115
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.
Definition: Interpolate.cpp:136
4-parameter interpolation of a 1-dimensional function given two points for which function values and ...
Definition: helper.h:10
std::ostream & operator<<(std::ostream &o, const Statistics &statistics)
Definition: Statistics.h:39
bool operator==(const Interpolate::point &lhs, const Interpolate::point &rhs)
Definition: Interpolate.h:60
Definition: Interpolate.h:15
double x
Definition: Interpolate.h:16
double f2
Definition: Interpolate.h:19
double f
Definition: Interpolate.h:17
double f1
Definition: Interpolate.h:18
friend std::ostream & operator<<(std::ostream &os, const point &p)