|
Optimist
0.0.0
A C++ library for optimization
|
Himmelblau's function. More...
#include <Himmelblau.hh>
Inherits Optimist::TestSet::DenseCostFunction< Vector, 2, Himmelblau< Vector > >.
Public Types | |
| using | Base = DenseCostFunction<Vector, 2, Himmelblau<Vector>> |
| Public Types inherited from Optimist::TestSet::DenseCostFunction< Vector, 2, Himmelblau< Vector > > | |
| using | VectorTrait |
| using | Scalar |
| using | Dense |
| using | DenseMatrix |
| Public Types inherited from Optimist::FunctionBase< Input, Output, DerivedFunction > | |
| using | InputTrait = TypeTrait<Input> |
| using | OutputTrait = TypeTrait<Output> |
| using | Scalar = typename InputTrait::Scalar |
| using | FirstDerivative |
| using | SecondDerivative |
Public Member Functions | |
| Himmelblau () | |
| constexpr std::string | name_impl () const |
| Scalar | value (const Dense &x) const |
| void | gradient (const Dense &x, Dense &g) const |
| void | hessian (const Dense &x, DenseMatrix &H) const |
| Public Member Functions inherited from Optimist::TestSet::DenseCostFunction< Vector, 2, Himmelblau< Vector > > | |
| bool | evaluate_impl (const Vector &x, Scalar &out) const |
| bool | first_derivative_impl (const Vector &x, FirstDerivative &out) const |
| bool | second_derivative_impl (const Vector &x, SecondDerivative &out) const |
| Public Member Functions inherited from Optimist::Function< Input, Output, DerivedFunction > | |
| Function () | |
| constexpr std::string | name () const |
| bool | evaluate (const Input &x, Output &out) const |
| bool | jacobian (const Input &x, FirstDerivative &out) const |
| bool | hessian (const Input &x, SecondDerivative &out) const |
| Public Member Functions inherited from Optimist::FunctionBase< Input, Output, DerivedFunction > | |
| FunctionBase () | |
| constexpr std::string | name () const |
| bool | evaluate (const Input &x, Output &out) const |
| bool | first_derivative (const Input &x, FirstDerivative &out) const |
| bool | second_derivative (const Input &x, SecondDerivative &out) const |
| constexpr Integer | input_dimension () const |
| constexpr Integer | output_dimension () const |
| const std::vector< Input > & | solutions () const |
| const std::vector< Input > & | guesses () const |
| const Input & | solution (const Integer i) const |
| const Input & | guess (const Integer i) const |
| bool | is_solution (const Input &x, const Scalar tol=FunctionBase::SQRT_EPSILON) const |
Additional Inherited Members | |
| Static Public Member Functions inherited from Optimist::TestSet::DenseCostFunction< Vector, 2, Himmelblau< Vector > > | |
| static constexpr Integer | dimension () |
| Protected Member Functions inherited from Optimist::TestSet::DenseCostFunction< Vector, 2, Himmelblau< Vector > > | |
| void | add_solution (const Dense &x) |
| void | add_guess (const Dense &x) |
| Static Protected Member Functions inherited from Optimist::TestSet::DenseCostFunction< Vector, 2, Himmelblau< Vector > > | |
| static Dense | make (std::initializer_list< Scalar > values) |
| Protected Attributes inherited from Optimist::FunctionBase< Input, Output, DerivedFunction > | |
| std::vector< Input > | m_solutions |
| std::vector< Input > | m_guesses |
\[ f(x, y) = (x^2 + y - 11)^2 + (x + y^2 - 7)^2 \text{,} \]
which has four identical local minima \( f = 0 \) (and therefore tests whether a solver lands on one of several solutions), a local maximum and four saddle points.
| Vector | Eigen vector type. |
| using Optimist::TestSet::Himmelblau< Vector >::Base = DenseCostFunction<Vector, 2, Himmelblau<Vector>> |
|
inline |
Class constructor for Himmelblau's function.
|
inline |
|
inline |
|
inlineconstexpr |
|
inline |