Optimist  0.0.0
A C++ library for optimization
Loading...
Searching...
No Matches
Optimist::TestSet::Brown< Real > Class Template Reference

Class container for the Brown badly scaled function. More...

#include <Brown.hh>

Inherits Optimist::Function< Real, 2, 3, Brown< Real > >.

Public Member Functions

 Brown ()
std::string name_impl () const
bool evaluate_impl (const InputVector &x, OutputVector &out) const
bool first_derivative_impl (const InputVector &x, Matrix &out) const
bool second_derivative_impl (const InputVector &, Tensor &out) const
Public Member Functions inherited from Optimist::Function< Real, 2, 3, Brown< Real > >
 Function ()
std::string name () const
bool evaluate (const InputVector &x, OutputVector &out) const
bool jacobian (const InputVector &x, Matrix &out) const
bool hessian (const InputVector &x, Tensor &out) const
Public Member Functions inherited from Optimist::FunctionBase< Real, N, M, Brown< Real >, false >
 FunctionBase ()
std::string name () const
bool evaluate (const InputType &x, OutputType &out) const
bool first_derivative (const InputType &x, FirstDerivativeType &out) const
bool second_derivative (const InputType &x, SecondDerivativeType &out) const
constexpr Integer input_dimension () const
constexpr Integer output_dimension () const
const std::vector< InputType > & solutions () const
const std::vector< InputType > & guesses () const
const InputTypesolution (Integer const i) const
const InputTypeguess (Integer const i) const
bool is_solution (const InputType &x, Real const tol=EPSILON_LOW) const

Private Attributes

Real m_a {1.0e-6}

Additional Inherited Members

Public Types inherited from Optimist::Function< Real, 2, 3, Brown< Real > >
using InputVector
using OutputVector
using Matrix
using Tensor
Public Types inherited from Optimist::FunctionBase< Real, N, M, Brown< Real >, false >
using InputType
using OutputType
using FirstDerivativeType
using SecondDerivativeType
Protected Attributes inherited from Optimist::FunctionBase< Real, N, M, Brown< Real >, false >
std::vector< InputTypem_solutions
std::vector< InputTypem_guesses

Detailed Description

template<typename Real>
class Optimist::TestSet::Brown< Real >

Class container for the Brown badly scaled function, which is defined as:

\[\mathbf{f}(\mathbf{x}) = \begin{bmatrix} x_1 - a \\ x_2 - 2a \\ x_1x_2 - 2 \end{bmatrix} \text{,} \]

where \(a = 10^{-6}\). The function has one solution at \(\mathbf{x} = [a, 2a]^\top\), with \(f(\mathbf{x}) = 0\). The initial guess is generated at \(\mathbf{x} = [1, 1]^\top\).

Template Parameters
RealScalar number type.

Constructor & Destructor Documentation

◆ Brown()

template<typename Real>
Optimist::TestSet::Brown< Real >::Brown ( )
inline

Class constructor for the Brown function.

Member Function Documentation

◆ evaluate_impl()

template<typename Real>
bool Optimist::TestSet::Brown< Real >::evaluate_impl ( const InputVector & x,
OutputVector & out ) const
inline

Compute the function value at the input point.

Parameters
[in]xInput point.
[out]outThe function value.
Returns
The boolean flag for successful evaluation.

◆ first_derivative_impl()

template<typename Real>
bool Optimist::TestSet::Brown< Real >::first_derivative_impl ( const InputVector & x,
Matrix & out ) const
inline

Compute the first derivative value at the input point.

Parameters
[in]xInput point.
[out]outThe first derivative value.
Returns
The boolean flag for successful evaluation.

◆ name_impl()

template<typename Real>
std::string Optimist::TestSet::Brown< Real >::name_impl ( ) const
inline

Get the function name.

Returns
The function name.

◆ second_derivative_impl()

template<typename Real>
bool Optimist::TestSet::Brown< Real >::second_derivative_impl ( const InputVector & ,
Tensor & out ) const
inline

Compute the second derivative value at the input point.

Parameters
[in]xInput point.
[out]outThe second derivative value.
Returns
The boolean flag for successful evaluation.

Member Data Documentation

◆ m_a

template<typename Real>
Real Optimist::TestSet::Brown< Real >::m_a {1.0e-6}
private

Scaling value (keep it low to guarantee bad scaling).


The documentation for this class was generated from the following file: