21 throw Exception(
"NumTools::uniRoot(). Initial interval values are not of opposite sign.");
22 double c = (a + b) / 2.;
24 while (abs(fb - fa) > tolerance)
48 size_t n = parameters.
size();
50 auto hessian = make_unique<RowMatrix<double>>(n, n);
51 for (
unsigned int i = 0; i < n; i++)
53 for (
unsigned int j = 0; j < n; j++)
56 (*hessian)(i, j) =
function.d2f(variables[i], parameters);
58 (*hessian)(i, j) =
function.d2f(variables[i], variables[j], parameters);
This class is designed to facilitate the manipulation of parameters.
This is the function abstract class.
The parameter list object.
virtual std::vector< std::string > getParameterNames() const
Get all parameter names in the list.
virtual void addParameter(const Parameter ¶m)
Add a new parameter at the end of the list.
Exception base class. Overload exception constructor (to control the exceptions mechanism). Destructor is already virtual (from std::exception)
virtual double f(const ParameterList ¶meters)
Get the value of the function according to a given set of parameters.
This is the abstract class for second order derivable functions.