15 std::vector<double> p(3);
29 std::cout <<
"test Min1D " << min.
Name() <<
" Return code " << min.
Status() << std::endl;
31 std::cout.precision(20);
33 std::cout <<
"Found minimum: x = " << min.
XMinimum() <<
" f(x) = " << min.
FValMinimum() << std::endl;
41 std::cout <<
"test Min1D " << min.
Name() <<
" Return code " << min.
Status() << std::endl;
43 std::cout.precision(20);
45 std::cout <<
"Found minimum: x = " << min.
XMinimum() <<
" f(x) = " << min.
FValMinimum() << std::endl;
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
bool Minimize(int maxIter, double absTol, double relTol)
Find minimum position iterating until convergence specified by the absolute and relative tolerance or...
double FValMinimum() const
Return function value at current estimate of the minimum.
double XMinimum() const
Return current estimate of the position of the minimum.
virtual void SetParameters(const double *p)
Set the parameter values.
int Status() const
Return status of last minimization.
Parametric Function class describing polynomials of order n.
Minimizer for arbitrary one dimensional functions.
const char * Name() const
Return name of minimization algorithm.
double func(double *x, double *p)
void testMinimization1D()
void SetFunction(const UserFunc &f, double xmin, double xlow, double xup)
Set, or reset, minimizer to use the function f and the initial search interval [xlow, xup], with a guess for the location of the minimum xmin.