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...
int Status() const
Return status of last minimization.
bool Minimize(int maxIter, double absTol, double relTol)
Find minimum position iterating until convergence specified by the absolute and relative tolerance or...
virtual void SetParameters(const double *p)
Set the parameter values.
Parametric Function class describing polynomials of order n.
Minimizer for arbitrary one dimensional functions.
double func(double *x, double *p)
const char * Name() const
Return name of minimization algorithm.
double FValMinimum() const
Return function value at current estimate of the minimum.
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.
double XMinimum() const
Return current estimate of the position of the minimum.