Optimist
0.0.0
A C++ library for optimization
|
Class container for the Brown badly scaled function. More...
#include <Brown.hh>
Inherits Optimist::VectorFunction< Real, 2, 3, Brown< Real > >.
Public Types | |
using | InputVector = typename VectorFunction<Real, 2, 3, Brown<Real>>::InputVector |
using | OutputVector = typename VectorFunction<Real, 2, 3, Brown<Real>>::OutputVector |
using | Matrix = typename VectorFunction<Real, 2, 3, Brown<Real>>::Matrix |
using | Tensor = typename VectorFunction<Real, 2, 3, Brown<Real>>::Tensor |
![]() | |
using | InputVector |
using | OutputVector |
using | Matrix |
using | Tensor |
![]() | |
using | InputType |
using | OutputType |
using | FirstDerivativeType |
using | SecondDerivativeType |
Public Member Functions | |
Brown () | |
std::string | name_impl () const |
void | evaluate_impl (const InputVector &x, OutputVector &out) const |
void | first_derivative_impl (const InputVector &x, Matrix &out) const |
void | second_derivative_impl (const InputVector &, Tensor &out) const |
![]() | |
VectorFunction () | |
std::string | name () const |
void | evaluate (const InputVector &x, OutputVector &out) const |
void | jacobian (const InputVector &x, Matrix &out) const |
void | hessian (const InputVector &x, Tensor &out) const |
![]() | |
Function () | |
std::string | name () const |
void | evaluate (const InputType &x, OutputType &out) const |
void | first_derivative (const InputType &x, FirstDerivativeType &out) const |
void | 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 InputType & | solution (const Integer i) const |
const InputType & | guess (const Integer i) const |
bool | is_solution (const InputType &x, const Real tol=EPSILON_LOW) const |
Private Attributes | |
Real | m_a {1.0e-6} |
Additional Inherited Members | |
![]() | |
friend | Function< Real, N, M, VectorFunction< Real, N, M, DerivedFunction > > |
![]() | |
std::vector< InputType > | m_solutions |
std::vector< InputType > | m_guesses |
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\).
Real | Scalar number type. |
using Optimist::TestSet::Brown< Real >::InputVector = typename VectorFunction<Real, 2, 3, Brown<Real>>::InputVector |
< Basic constants.
using Optimist::TestSet::Brown< Real >::Matrix = typename VectorFunction<Real, 2, 3, Brown<Real>>::Matrix |
using Optimist::TestSet::Brown< Real >::OutputVector = typename VectorFunction<Real, 2, 3, Brown<Real>>::OutputVector |
using Optimist::TestSet::Brown< Real >::Tensor = typename VectorFunction<Real, 2, 3, Brown<Real>>::Tensor |
|
inline |
Class constructor for the Brown function.
|
inline |
Compute the function value at the input point.
[in] | x | Input point. |
[out] | out | The function value. |
|
inline |
Compute the first derivative value at the input point.
[in] | x | Input point. |
[out] | out | The first derivative value. |
|
inline |
Get the function name.
|
inline |
Compute the second derivative value at the input point.
[in] | x | Input point. |
[out] | out | The second derivative value. |
|
private |
Scaling value (keep it low to guarantee bad scaling).