Go to the source code of this file.
|
| double | cmp::fd_gradient (const Eigen::VectorXd &x_0, const std::function< double(const Eigen::VectorXd &)> fun, const int &i, const accuracy order=SECOND, const double h=1E-5) |
| | Computes the i-th component of the gradient of the function fun evaluated at x_0 using a central difference scheme.
|
| |
| double | cmp::fd_hessian (const Eigen::VectorXd &x_0, const std::function< double(const Eigen::VectorXd &)> fun, const int &i, const int &j, const accuracy order=SECOND, const double h=1E-5) |
| | Computes the i-th and j-th component of the Hessian of the function fun evaluated at x_0 using a central difference scheme.
|
| |