MiniTensor Version of the Day
Loading...
Searching...
No Matches
minitensor::StyblinskiTang< S, M > Class Template Reference

#include <MiniTensor_TestFunctions.h>

Inheritance diagram for minitensor::StyblinskiTang< S, M >:
minitensor::Function_Base< StyblinskiTang< S, 2 >, S, 2 >

Public Types

using Base = Function_Base<StyblinskiTang<S, M>, S, M>

Public Member Functions

 StyblinskiTang ()
template<typename T, Index N>
T value (Vector< T, N > const &x)
template<typename T, Index N>
Vector< T, N > gradient (Vector< T, N > const &x) const
template<typename T, Index N>
Tensor< T, N > hessian (Vector< T, N > const &x)
Public Member Functions inherited from minitensor::Function_Base< StyblinskiTang< S, 2 >, S, 2 >
 Function_Base ()
T value (StyblinskiTang< S, 2 > &f, Vector< T, N > const &x)
Vector< T, N > gradient (StyblinskiTang< S, 2 > &f, Vector< T, N > const &x)
Vector< T, N > residual (StyblinskiTang< S, 2 > &f, Vector< T, N > const &x)
Tensor< T, N > hessian (StyblinskiTang< S, 2 > &f, Vector< T, N > const &x)
void set_failed (char const *const msg=nullptr)
bool get_failed ()
void clear_failed ()
void set_failure_message (char const *const msg=nullptr)
char const * get_failure_message ()

Static Public Attributes

static constexpr char const *const NAME {"Styblinski-Tang"}
Static Public Attributes inherited from minitensor::Function_Base< StyblinskiTang< S, 2 >, S, 2 >
static constexpr Index DIMENSION

Additional Inherited Members

Protected Attributes inherited from minitensor::Function_Base< StyblinskiTang< S, 2 >, S, 2 >
bool failed
char const * failure_message
 Keep a message to inform what went wrong above.

Detailed Description

template<typename S, Index M = 2>
class minitensor::StyblinskiTang< S, M >

Styblinski-Tang function NLS: the residual is the gradient of \( \frac{1}{2}\sum_{i=1}^{2} (x_i^4 - 16 x_i^2 + 5 x_i) \). Two-dimensional with multiple local minima; global minimum at \( x_i \approx -2.9035 \).

Definition at line 559 of file MiniTensor_TestFunctions.h.

Member Typedef Documentation

◆ Base

template<typename S, Index M = 2>
using minitensor::StyblinskiTang< S, M >::Base = Function_Base<StyblinskiTang<S, M>, S, M>

Base class type.

Definition at line 578 of file MiniTensor_TestFunctions.h.

Constructor & Destructor Documentation

◆ StyblinskiTang()

template<typename S, Index M = 2>
minitensor::StyblinskiTang< S, M >::StyblinskiTang ( )
inline

Constructor.

Definition at line 566 of file MiniTensor_TestFunctions.h.

Member Function Documentation

◆ value()

template<typename S, Index M = 2>
template<typename T, Index N>
T minitensor::StyblinskiTang< S, M >::value ( Vector< T, N > const & x)
inline

Objective value.

Definition at line 586 of file MiniTensor_TestFunctions.h.

◆ gradient()

template<typename S, Index M = 2>
template<typename T, Index N>
Vector< T, N > minitensor::StyblinskiTang< S, M >::gradient ( Vector< T, N > const & x) const
inline

Gradient of the objective.

Definition at line 597 of file MiniTensor_TestFunctions.h.

◆ hessian()

template<typename S, Index M = 2>
template<typename T, Index N>
Tensor< T, N > minitensor::StyblinskiTang< S, M >::hessian ( Vector< T, N > const & x)
inline

Hessian of the objective.

Definition at line 619 of file MiniTensor_TestFunctions.h.

Member Data Documentation

◆ NAME

template<typename S, Index M = 2>
char const* const minitensor::StyblinskiTang< S, M >::NAME {"Styblinski-Tang"}
staticconstexpr

Function name.

Definition at line 573 of file MiniTensor_TestFunctions.h.


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