FunctionWithQuadraticPenalty< N, Function, Constraint, T, Point > Class Template Reference

An objective function with a quadratic penalty. More...

#include <FunctionWithQuadraticPenalty.h>

List of all members.

Public Types

typedef base_type::argument_type argument_type
 The argument type.
typedef base_type::result_type result_type
 The result type.

Public Member Functions

Constructors etc.

 FunctionWithQuadraticPenalty (const function_type &function, const constraint_type &constraint, const number_type penalty_parameter=1, const number_type reduction_factor=0.1)
 Construct from the objective function, the constraint and the penalty parameter.
 FunctionWithQuadraticPenalty (const FunctionWithQuadraticPenalty &x)
 Copy constructor.
virtual ~FunctionWithQuadraticPenalty ()
 Destructor.
Functor.

result_type operator() (const argument_type &x) const
 Return the value of the objective function with a quadratic penalty.
void gradient (const argument_type &x, argument_type &gradient) const
 Calculate the gradient of the objective function with a quadratic penalty.
Accessors.

const function_type & function () const
 Return a const reference to the objective function.
const constraint_type & constraint () const
 Return a const reference to the constraint function.
number_type penalty_parameter () const
 Return the value of the penalty parameter.
number_type reduction_factor () const
 Return the value of the penalty parameter reduction factor.
Manipulators.

void increase_penalty () const
 Increase the penalty be decreasing the penalty parameter by the reduction factor.
void set_penalty_parameter (const number_type penalty_parameter) const
 Set the penalty parameter.
void set_reduction_factor (const number_type reduction_factor) const
 Set the reduction factor.

Detailed Description

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

An objective function with a quadratic penalty.

Parameters:
N is the problem dimension.
Function is the functor to minimize.
Constraint is the equality constraint functor.
T is the number type. By default it is Function::result_type;
Point is the point type. By default it is Function::argument_type;

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