2 #include <boost/math/tools/roots.hpp> 10 if (numParameters > 1)
11 throw itk::ExceptionObject(__FILE__, __LINE__,
"TOMS748 algorithm does not implement multi-dimensional optimization. Only one parameter allowed.");
21 std::pair <double,double> r;
26 r = boost::math::tools::toms748_solve(boostFunction, this->
GetLowerBound(), this->
GetUpperBound(), rootTolerance, maximumNumberOfIterations);
28 return (r.first + r.second) / 2.0;
double GetFunctionValueAtInitialLowerBound()
bool GetProvidedFunctionValueAtInitialLowerBound()
void SetRootFindingFunction(BaseCostFunctionType *f)
double GetRootRelativeTolerance()
void SetRootRelativeTolerance(const double &tol)
bool GetProvidedFunctionValueAtInitialUpperBound()
unsigned int GetMaximumNumberOfIterations()
double GetFunctionValueAtInitialUpperBound()
double Optimize() ITK_OVERRIDE
BaseCostFunctionType * GetRootFindingFunction()