|
Interior-point-optimisation
1.0-1
Interior-pointoptimisationlibrary
|
Backtracking line search. More...
#include <LineSearch.hpp>

Classes | |
| class | Parameters |
| Line search parameters. More... | |
Public Member Functions | |
| LineSearch (ipo_function::Function &function, double const alpha=1e-3, double const beta=0.8, double const epsilon=std::sqrt(std::numeric_limits< double >::epsilon()), size_t const maxNoImproveSteps=10) | |
| Set up the line search function object with a function and some default parameters. More... | |
| double | operator() (gsl::vector &vector, gsl::vector const direction, double const functionValue=-std::numeric_limits< double >::infinity(), gsl::vector const gradientValue=gsl::vector(nullptr)) |
| Carry out the line search. More... | |
| void | setFunctionScale (double const functionScale) |
| Set the scaling factor for output of function values. More... | |
| Parameters & | getParameters () |
| Get parameters by reference. More... | |
Protected Attributes | |
| ipo_function::Function & | function |
| The function. More... | |
| double | functionScale { 1.0 } |
| Scaling factor for output of function values. More... | |
Private Attributes | |
| Parameters | parameters |
Backtracking line search.
This class defines function objects to carry out backtracking line search assuming a good step size and a nearly locally quadratic function.
Definition at line 36 of file LineSearch.hpp.
| LineSearch::LineSearch | ( | ipo_function::Function & | function, |
| double const | alpha = 1e-3, |
||
| double const | beta = 0.8, |
||
| double const | epsilon = std::sqrt( std::numeric_limits<double>::epsilon() ), |
||
| size_t const | maxNoImproveSteps = 10 |
||
| ) |
Set up the line search function object with a function and some default parameters.
| function | The function |
| alpha | A value in (0,0.5) |
| beta | A value in (0,1) |
| epsilon | A value to be used if the gradient is not supplied in the function operator call |
| maxNoImproveSteps | The maximum number of backtracing steps to accept with no consecutive improvements |
Definition at line 41 of file LineSearch.cc.
| LineSearch::Parameters & LineSearch::getParameters | ( | ) |
Get parameters by reference.
Definition at line 39 of file LineSearch.cc.
References parameters.
Referenced by ipo::detail::NewtonDescent::getLineSearchParameters().
| double LineSearch::operator() | ( | gsl::vector & | vector, |
| gsl::vector const | direction, | ||
| double const | functionValue = -std::numeric_limits<double>::infinity(), |
||
| gsl::vector const | gradientValue = gsl::vector( nullptr ) |
||
| ) |
Carry out the line search.
Note that if values are supplied for function and gradient, they are not checked.
| vector | The vector: on return this is the updated value. |
| direction | The direction of search |
| functionValue | The function evaluated at vector: if no value is supplied a value is computed |
| gradientValue | The gradient evaluated at vector: if no value is supplied a forward difference estimate is computed |
Definition at line 82 of file LineSearch.cc.
References functionScale, ipo::detail::LineSearch::Parameters::getAlpha(), ipo::detail::LineSearch::Parameters::getBeta(), ipo::detail::LineSearch::Parameters::getEpsilon(), ipo::detail::LineSearch::Parameters::getMaxNoImproveSteps(), ipo::detail::LineSearch::Parameters::getOutputStream(), ipo::detail::LineSearch::Parameters::getVectorDigits(), ipo_function::GradientEstimate::gradient(), ipo::format::infinity, parameters, and ipo_function::detail::ForwardDifferenceGradientEstimate::setVector().
|
inline |
Set the scaling factor for output of function values.
This is used in InteriorPoint to show the value of the original function.
| functionScale | The new value |
Definition at line 209 of file LineSearch.hpp.
References functionScale.
Referenced by ipo::detail::NewtonDescent::operator()().
|
protected |
The function.
Definition at line 220 of file LineSearch.hpp.
|
protected |
Scaling factor for output of function values.
Definition at line 224 of file LineSearch.hpp.
Referenced by operator()(), and setFunctionScale().
|
private |
Definition at line 172 of file LineSearch.hpp.
Referenced by getParameters(), and operator()().