iterative-solver 0.0
molpro::linalg::itsolv::Interpolate Class Reference

#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)
 

Constructor & Destructor Documentation

◆ Interpolate()

Interpolate::Interpolate ( point  p0,
point  p1,
std::string  interpolant = "cubic",
int  verbosity = 0 
)
explicit

Construct the interpolant.

Parameters
p0Defining point
p1Defining point
interpolantThe interpolation method. An exception is thrown if it is not one of the implemented values.
verbosityValues greater than zero show information on constructing and using the interpolant.

Member Function Documentation

◆ interpolants()

std::vector< std::string > Interpolate::interpolants ( )
static

◆ minimize()

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.

Parameters
xafirst bound of range
xbsecond bound of range
bracket_gridnumber 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.
Returns
The minimum point. The result may be one of Interpolate(xa), Interpolate(xb) with non-zero first derivative, if no other minimum was found in the interval

◆ minimize_cubic()

Interpolate::point Interpolate::minimize_cubic ( ) const

◆ operator()()

Interpolate::point Interpolate::operator() ( double  x) const

Evaluate the interpolant and its derivative at a given point.

Parameters
x
Returns

◆ parameters()

const std::vector< double > & molpro::linalg::itsolv::Interpolate::parameters ( ) const
inline

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Interpolate interpolant 
)
friend