Optimist  0.0.0
A C++ library for optimization
Loading...
Searching...
No Matches
Optimist::TestSet::Rosenbrock< Vector, N > Class Template Reference

Class container for the extended Rosenbrock function. More...

#include <Rosenbrock.hh>

Inherits Optimist::TestSet::DenseSystemFunction< Vector, N, Rosenbrock< Vector, N > >.

Public Types

using Base = DenseSystemFunction<Vector, N, Rosenbrock<Vector, N>>
Public Types inherited from Optimist::TestSet::DenseSystemFunction< Vector, N, Rosenbrock< Vector, N > >
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

 Rosenbrock ()
constexpr std::string name_impl () const
void residual (const Dense &x, Dense &F) const
void jacobian (const Dense &x, DenseMatrix &J) const
void hessian (const Dense &x, const Integer i, DenseMatrix &H) const
Public Member Functions inherited from Optimist::TestSet::DenseSystemFunction< Vector, N, Rosenbrock< Vector, N > >
bool evaluate_impl (const Vector &x, Vector &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::DenseSystemFunction< Vector, N, Rosenbrock< Vector, N > >
static constexpr Integer dimension ()
static constexpr Integer equations ()
Protected Member Functions inherited from Optimist::TestSet::DenseSystemFunction< Vector, N, Rosenbrock< Vector, N > >
void add_solution (const Dense &x)
void add_guess (const Dense &x)
Static Protected Member Functions inherited from Optimist::TestSet::DenseSystemFunction< Vector, N, Rosenbrock< Vector, N > >
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

Detailed Description

template<typename Vector, Integer N>
requires (N % 2 == 0)
class Optimist::TestSet::Rosenbrock< Vector, N >

Square system of \( N \) (even) equations,

\[ \mathbf{f}(\mathbf{x}) = \begin{bmatrix} 10(x_2 - x_1^2) \\ 1 - x_1 \\ \vdots \\ 10(x_N - x_{N-1}^2) \\ 1 - x_{N-1} \end{bmatrix} \text{,} \]

with solution \( \mathbf{x} = (1, \dots, 1) \), from the guess \((-1.2, 1, \dots, -1.2, 1) \). See RosenbrockCost for the scalar cost function.

Template Parameters
VectorEigen vector type.
NProblem dimension (even).

Member Typedef Documentation

◆ Base

template<typename Vector, Integer N>
using Optimist::TestSet::Rosenbrock< Vector, N >::Base = DenseSystemFunction<Vector, N, Rosenbrock<Vector, N>>

Constructor & Destructor Documentation

◆ Rosenbrock()

template<typename Vector, Integer N>
Optimist::TestSet::Rosenbrock< Vector, N >::Rosenbrock ( )
inline

Class constructor for the extended Rosenbrock function.

Member Function Documentation

◆ hessian()

template<typename Vector, Integer N>
void Optimist::TestSet::Rosenbrock< Vector, N >::hessian ( const Dense & x,
const Integer i,
DenseMatrix & H ) const
inline

◆ jacobian()

template<typename Vector, Integer N>
void Optimist::TestSet::Rosenbrock< Vector, N >::jacobian ( const Dense & x,
DenseMatrix & J ) const
inline

◆ name_impl()

template<typename Vector, Integer N>
std::string Optimist::TestSet::Rosenbrock< Vector, N >::name_impl ( ) const
inlineconstexpr

Get the function name.

Returns
The function name.

◆ residual()

template<typename Vector, Integer N>
void Optimist::TestSet::Rosenbrock< Vector, N >::residual ( const Dense & x,
Dense & F ) const
inline

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