|
Optimist
0.0.0
A C++ library for optimization
|
Classes | |
| class | Epsilon |
Functions | |
| template<typename Vector, typename Scalar> | |
| void | SideFiniteDifferences (const Scalar f_0, const Scalar f_1, const Scalar f_2, const Scalar h_1, const Scalar h_2, const Integer i, Vector &out) |
| template<typename Vector, typename Scalar> | |
| void | CenteredFiniteDifferences (const Scalar f_l, const Scalar f_c, const Scalar f_r, const Scalar h, const Integer i, Vector &out) |
| template<typename Vector, typename Matrix, typename Scalar> | |
| void | SideFiniteDifferences (const Vector &f_0, const Vector &f_1, const Vector &f_2, const Scalar h_1, const Scalar h_2, const Integer i, Matrix &out) |
| template<typename Vector, typename Matrix, typename Scalar> | |
| void | CenteredFiniteDifferences (const Vector &f_l, const Vector &f_c, const Vector &f_r, const Scalar h, const Integer i, Matrix &&out) |
| template<typename Function, typename Vector, typename Scalar = typename Vector::Scalar> | |
| bool | Gradient (Function &&function, const Vector &x, Vector &out) |
| template<typename Function, typename Vector, typename Matrix, typename Scalar = typename Vector::Scalar> | |
| bool | Jacobian (Function &&function, const Vector &x, Matrix &out) |
| template<typename Function, typename Vector, typename Matrix, typename Scalar = typename Vector::Scalar> | |
| bool | Hessian (Function &&function, const Vector &x, Matrix &out) |
|
inline |
|
inline |
Compute centered finite differences (for dense and Eigen vectors).
| Vector | Dense or sparse Eigen vector type. |
| Matrix | Dense or sparse Eigen matrix type. |
| Scalar | Floating-point number type. |
| [in] | f_l | Vector at \( x-h \). |
| [in] | f_c | Vector at \( x \). |
| [in] | f_r | Vector at \( x+h \). |
| [in] | h | Step size. |
| [in] | i | Index of the variable. |
| [out] | out | The approximated derivative vector. |
|
inline |
Compute finite differences gradient for a scalar function (for dense Eigen vectors).
| Function | Callable type bool(Vector const &, Scalar &). |
| Vector | Dense Eigen vector type. |
| Scalar | Floating-point number type. |
| [in] | function | Function to differentiate. |
| [in] | x | Point at which to compute gradient. |
| [out] | out | Gradient vector. |
|
inline |
Compute finite differences Hessian for a scalar function (for dense Eigen vectors).
| Function | Callable type bool(Vector const &, Scalar &). |
| Vector | Dense Eigen vector type. |
| Matrix | Dense Eigen matrix type. |
| Scalar | Floating-point number type. |
| [in] | function | Function to differentiate. |
| [in] | x | Point at which to compute Hessian. |
| [out] | out | Hessian matrix. |
|
inline |
Compute finite differences Jacobian for a vector function (for dense Eigen vectors).
| Function | Callable type bool(Vector const &, Vector &). |
| Vector | Dense Eigen vector type. |
| Matrix | Dense Eigen matrix type. |
| Scalar | Floating-point number type. |
| [in] | fun | Function to differentiate. |
| [in] | x | Point at which to compute Jacobian. |
| [out] | out | Jacobian matrix. |
|
inline |
Compute one-sided finite differences.
| Scalar | Floating-point number type. |
|
inline |
Compute one-sided finite differences (for dense Eigen vectors).
| Vector | Dense or sparse Eigen vector type. |
| Matrix | Dense or sparse Eigen matrix type. |
| Scalar | Floating-point number type. |
| [in] | f_0 | Vector at \( x \). |
| [in] | f_1 | Vector at \( x+h_1 \). |
| [in] | f_2 | Vector at \( x+h_2 \). |
| [in] | h_1 | Step size 1. |
| [in] | h_2 | Step size 2. |
| [in] | i | Index of the variable. |
| [out] | out | The approximated derivative. |