Generic implementation of box constrained quasi-Newton algorithms.
More...
#include <BoxConstrainedAlgorithm.hpp>
|
| static bool | check_bounds (Problem &problem) |
| | Verify that the bounds are correct. More...
|
| |
| static Vector< Scalar > | truncate_x (Problem &problem, const Vector< Scalar > &x) |
| | Truncate vector such that it fulfills the box constraints. More...
|
| |
| static Scalar | gradient_norm (Problem &problem, const Vector< Scalar > &x, const Vector< Scalar > &g) |
| | Calculate the projected gradient norm ( norm) More...
|
| |
| static Scalar | max_step_length (Problem &problem, const Vector< Scalar > &x, const Vector< Scalar > &p) |
| | Calculate the maximum allowed step length. More...
|
| |
| template<typename OutputFunction > |
| static Vector< Scalar > | search_direction (Problem &problem, Storage &storage, const Vector< Scalar > &x, const Vector< Scalar > &g, const Scalar &check_epsilon, const Scalar &machine_epsilon, OutputFunction &output_function) |
| | Calculate the new search direction. More...
|
| |
template<typename Problem, typename Scalar, typename Storage>
struct LSLOpt::Implementation::BoxConstrainedAlgorithm< Problem, Scalar, Storage >
Generic implementation of box constrained quasi-Newton algorithms.
- Template Parameters
-
| Problem | The optimization problem type. |
| Scalar | The scalar type of vector/matrix coefficients. |
| Storage | The algorithm storage, i.e. BFGS, L-BFGS etc. |
◆ check_bounds()
template<typename Problem , typename Scalar , typename Storage >
Verify that the bounds are correct.
- Parameters
-
| problem | The minimization problem (including box constraints). |
- Returns
true if the bounds are ok, false otherwise
◆ gradient_norm()
template<typename Problem , typename Scalar , typename Storage >
◆ max_step_length()
template<typename Problem , typename Scalar , typename Storage >
Calculate the maximum allowed step length.
- Parameters
-
| problem | The minimization problem (including box constraints). |
| x | Current value. |
| p | Current search direction. |
- Returns
- Maximum allowed step length that does not violate the bounds.
◆ search_direction()
template<typename Problem , typename Scalar , typename Storage >
template<typename OutputFunction >
Calculate the new search direction.
- Parameters
-
| problem | The minimization problem (including box constraints). |
| storage | The storage for calculation of Hessian vector products. |
| x | Current value. |
| g | Current gradient. |
| check_epsilon | Small value to check numerical stability. |
| machine_epsilon | Small value with machine accuracy. |
| output_function | Function for status output. |
This function first calculates the generalized cauchy point and then performs a direct primal subspace minimization.
This technique is described in:
Byrd, R.H., Lu, P., Nocedal, J., Zhu, C. A Limited Memory Algorithm for Bound Constrained Optimization. 1995. SIAM Journal of Scientific and Statistical Computing. 16(5). 1190-1208.
- Todo:
- It must be checked if this is something that just happens or if this points to some subtle bug.
◆ truncate_x()
template<typename Problem , typename Scalar , typename Storage >
Truncate vector such that it fulfills the box constraints.
- Parameters
-
| problem | The minimization problem (including box constraints). |
| x | Vector to truncate. |
- Returns
- The truncated x vector.
The documentation for this struct was generated from the following file: