#include <Opt.h>
Inheritance diagram for numerical::Opt< N, Function, T, Point >:

Accessors. | |
| const function_type & | function () const |
| Return a constant reference to the objective function. | |
| int | max_function_calls () |
| Return the maximum allowed number of function calls. | |
| int | num_function_calls () const |
| Return the number of function calls required to find the minimum. | |
| static int | dimension () |
| Return the dimension, N. | |
Public Member Functions | |
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_are_checking_function_calls (const bool are_checking) |
| Set whether we are checking the number of function calls. | |
Protected Types | |
| typedef Function | function_type |
| The function type. | |
| typedef T | number_type |
| The number type. | |
| typedef Point | point_type |
| A point in N dimensions. | |
Protected Member Functions | |
Constructors etc. | |
The default constructor, the copy constructor and the assignment operator are not implemented. The implemented constructor and destructor are protected. | |
| Opt (const function_type &function, const int max_function_calls=10000, const bool are_checking_function_calls=true) | |
| Construct from the objective function. | |
| virtual | ~Opt () |
| Destructor. | |
Calling the objective function. | |
| number_type | evaluate_function (const point_type &x) |
| Evaluate the objective function and return the result. | |
| void | evaluate_gradient (const point_type &x, point_type &gradient) |
| Evaluate the gradient. | |
| void | evaluate_numeric_gradient (const point_type &x, point_type &gradient, const number_type delta=0.0) |
| Numerically evaluate the gradient. | |
Protected Attributes | |
| const function_type & | _function |
| The objective function. | |
| int | _max_function_calls |
| The maximum allowed number of function calls. | |
| int | _num_function_calls |
| The number of function calls required to find the minimum. | |
| bool | _are_checking_function_calls |
| If we are checking the number of function calls. | |
| 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 numerical::Opt< 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.
| void numerical::Opt< N, Function, T, Point >::evaluate_gradient | ( | const point_type & | x, | |
| point_type & | gradient | |||
| ) | [inline, protected] |
Evaluate the gradient.
Increment the count of the number of function calls.
| void numerical::Opt< N, Function, T, Point >::evaluate_numeric_gradient | ( | const point_type & | x, | |
| point_type & | gradient, | |||
| const number_type | delta = 0.0 | |||
| ) | [inline, protected] |
Numerically evaluate the gradient.
Increment the count of the number of function calls.
1.4.7