The coordinate descent method of Hooke and Jeeves. More...
#include <CoordinateDescent.h>
Public Types | |
typedef base_type::function_type | function_type |
The function type. | |
typedef base_type::number_type | number_type |
The number type. | |
typedef base_type::point_type | point_type |
A point in N dimensions. | |
Public Member Functions | |
Constructors etc. | |
CoordinateDescent (const function_type &function, const number_type initial_step_size=std::pow(std::numeric_limits< number_type >::epsilon(), 0.25), const number_type final_step_size=std::sqrt(std::numeric_limits< number_type >::epsilon()), const int max_function_calls=10000) | |
Construct from the objective function. | |
virtual | ~CoordinateDescent () |
Destructor. | |
Minimization. | |
bool | find_minimum (point_type &x, number_type &value, int &num_steps) |
Find the minimum. | |
bool | find_minimum (point_type &x, number_type &value) |
Find the minimum. | |
bool | find_minimum (point_type &x, int &num_steps) |
Find the minimum. | |
bool | find_minimum (point_type &x) |
Find the minimum. | |
Manipulators. | |
void | set_max_function_calls (const int max_function_calls) |
Set the maximum number of function call allowed per optimization. | |
void | reset_num_function_calls () |
Reset the number of function calls to zero. | |
void | set_initial_step_size (const number_type initial_step_size) |
Set the initial step size. | |
void | set_final_step_size (const number_type final_step_size) |
Set the stepsize at which to halt optimization. | |
void | set_step_size_reduction_factor (const number_type step_size_reduction_factor) |
Set the stepsize reduction factor. | |
Protected Member Functions | |
Calling the objective function. | |
Functionality inherited from Opt. | |
number_type | evaluate_function (const point_type &x) |
Evaluate the objective function and return the result. | |
Accessors. | |
| |
const function_type & | function () const |
Return a constant reference to the objective function. | |
int | num_function_calls () const |
Return the number of function calls required to find the minimum. | |
number_type | step_size_reduction_factor () const |
static int | dimension () |
Return the dimension, N. |
The coordinate descent method of Hooke and Jeeves.
N | is the problem dimension. | |
Function | is the functor to minimize. | |
T | is the number type. By default it is Function::result_type; | |
Point | is the point type. By default it is Function::argument_type; |
number_type CoordinateDescent< N, Function, T, Point >::evaluate_function | ( | const point_type & | x | ) | [inline, protected] |
Evaluate the objective function and return the result.
Increment the count of the number of function calls.
bool CoordinateDescent< N, Function, T, Point >::find_minimum | ( | point_type & | x | ) | [inline] |
Find the minimum.
x | The input value is the starting point. The output value is the minimum point found. |
bool CoordinateDescent< N, Function, T, Point >::find_minimum | ( | point_type & | x, | |
int & | num_steps | |||
) | [inline] |
Find the minimum.
x | The input value is the starting point. The output value is the minimum point found. | |
num_steps | is the number of time that a descent direction is successfully found. |
bool CoordinateDescent< N, Function, T, Point >::find_minimum | ( | point_type & | x, | |
number_type & | value | |||
) | [inline] |
Find the minimum.
x | The input value is the starting point. The output value is the minimum point found. | |
value | is the value of the objective function at the minimum point. |
bool CoordinateDescent< N, Function, T, Point >::find_minimum | ( | point_type & | x, | |
number_type & | value, | |||
int & | num_steps | |||
) |
Find the minimum.
x | The input value is the starting point. The output value is the minimum point found. | |
value | is the value of the objective function at the minimum point. | |
num_steps | is the number of time that a descent direction is successfully found. |
Referenced by CoordinateDescent< N, function_with_penalty_type, number_type, point_type >::find_minimum().