LSLOpt  1.0
Static Public Member Functions | List of all members
LSLOpt::Implementation::BoxConstrainedAlgorithm< Problem, Scalar, Storage > Struct Template Reference

Generic implementation of box constrained quasi-Newton algorithms. More...

#include <BoxConstrainedAlgorithm.hpp>

Static Public Member Functions

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 ( $ L_\infty $ 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...
 

Detailed Description

template<typename Problem, typename Scalar, typename Storage>
struct LSLOpt::Implementation::BoxConstrainedAlgorithm< Problem, Scalar, Storage >

Generic implementation of box constrained quasi-Newton algorithms.

Template Parameters
ProblemThe optimization problem type.
ScalarThe scalar type of vector/matrix coefficients.
StorageThe algorithm storage, i.e. BFGS, L-BFGS etc.

Member Function Documentation

◆ check_bounds()

template<typename Problem , typename Scalar , typename Storage >
bool LSLOpt::Implementation::BoxConstrainedAlgorithm< Problem, Scalar, Storage >::check_bounds ( Problem &  problem)
static

Verify that the bounds are correct.

Parameters
problemThe minimization problem (including box constraints).
Returns
true if the bounds are ok, false otherwise

◆ gradient_norm()

template<typename Problem , typename Scalar , typename Storage >
Scalar LSLOpt::Implementation::BoxConstrainedAlgorithm< Problem, Scalar, Storage >::gradient_norm ( Problem &  problem,
const Vector< Scalar > &  x,
const Vector< Scalar > &  g 
)
static

Calculate the projected gradient norm ( $ L_\infty $ norm)

Parameters
problemThe minimization problem (including box constraints).
xCurrent $ \mathbf{x} $ value.
gCurrent gradient for gradient norm calculation.
Returns
The projected gradient norm ( $ L_\infty $ norm).

◆ max_step_length()

template<typename Problem , typename Scalar , typename Storage >
Scalar LSLOpt::Implementation::BoxConstrainedAlgorithm< Problem, Scalar, Storage >::max_step_length ( Problem &  problem,
const Vector< Scalar > &  x,
const Vector< Scalar > &  p 
)
static

Calculate the maximum allowed step length.

Parameters
problemThe minimization problem (including box constraints).
xCurrent $ \mathbf{x} $ value.
pCurrent 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 >
Vector< Scalar > LSLOpt::Implementation::BoxConstrainedAlgorithm< Problem, Scalar, Storage >::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 
)
static

Calculate the new search direction.

Parameters
problemThe minimization problem (including box constraints).
storageThe storage for calculation of Hessian vector products.
xCurrent $ \mathbf{x} $ value.
gCurrent gradient.
check_epsilonSmall value to check numerical stability.
machine_epsilonSmall value with machine accuracy.
output_functionFunction 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 >
Vector< Scalar > LSLOpt::Implementation::BoxConstrainedAlgorithm< Problem, Scalar, Storage >::truncate_x ( Problem &  problem,
const Vector< Scalar > &  x 
)
static

Truncate vector such that it fulfills the box constraints.

Parameters
problemThe minimization problem (including box constraints).
xVector to truncate.
Returns
The truncated x vector.

The documentation for this struct was generated from the following file: