CoordinateDescent< N, Function, T, Point > Class Template Reference

The coordinate descent method of Hooke and Jeeves. More...

#include <CoordinateDescent.h>

Inheritance diagram for CoordinateDescent< N, Function, T, Point >:
Opt< N, Function, T, Point >

List of all members.

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.

The default constructor, the copy constructor and the assignment operator are not implemented.

 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_typefunction () 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.

Detailed Description

template<int N, class Function, typename T = typename Function::result_type, typename Point = typename Function::argument_type>
class CoordinateDescent< N, Function, T, Point >

The coordinate descent method of Hooke and Jeeves.

Parameters:
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;

Member Function Documentation

template<int N, class Function, typename T = typename Function::result_type, typename Point = typename 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.

template<int N, class Function, typename T = typename Function::result_type, typename Point = typename Function::argument_type>
bool CoordinateDescent< N, Function, T, Point >::find_minimum ( point_type x  )  [inline]

Find the minimum.

Parameters:
x The input value is the starting point. The output value is the minimum point found.
template<int N, class Function, typename T = typename Function::result_type, typename Point = typename Function::argument_type>
bool CoordinateDescent< N, Function, T, Point >::find_minimum ( point_type x,
int &  num_steps 
) [inline]

Find the minimum.

Parameters:
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.
template<int N, class Function, typename T = typename Function::result_type, typename Point = typename Function::argument_type>
bool CoordinateDescent< N, Function, T, Point >::find_minimum ( point_type x,
number_type value 
) [inline]

Find the minimum.

Parameters:
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.
template<int N, class Function, typename T = typename Function::result_type, typename Point = typename Function::argument_type>
bool CoordinateDescent< N, Function, T, Point >::find_minimum ( point_type x,
number_type value,
int &  num_steps 
)

Find the minimum.

Parameters:
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().


The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:15:00 2016 for Numerical Algorithms Package by  doxygen 1.6.3