|
MiniTensor Version of the Day
|
#include <MiniTensor_TestFunctions.h>
Public Types | |
| using | Base = Function_Base< Rosenbrock< S, M >, S, M > |
Public Member Functions | |
| Rosenbrock (S a=1.0, S b=100.0) | |
| 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) |
| template<typename T , Index N> | |
| Tensor< T, N > | hessian (Vector< T, N > const &x) |
Public Member Functions inherited from minitensor::Function_Base< FunctionDerived, S, M > | |
| Function_Base () | |
| template<typename T , Index N> | |
| T | value (FunctionDerived &f, Vector< T, N > const &x) |
| template<typename T , Index N> | |
| Vector< T, N > | gradient (FunctionDerived &f, Vector< T, N > const &x) |
| template<typename T , Index N> | |
| Vector< T, N > | residual (FunctionDerived &f, Vector< T, N > const &x) |
| template<typename T , Index N> | |
| Tensor< T, N > | hessian (FunctionDerived &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 {"Rosenbrock's Function 2D"} |
Static Public Attributes inherited from minitensor::Function_Base< FunctionDerived, S, M > | |
| static constexpr Index | DIMENSION {M} |
Private Attributes | |
| S | a_ {1.0} |
| S | b_ {100.0} |
Additional Inherited Members | |
Protected Attributes inherited from minitensor::Function_Base< FunctionDerived, S, M > | |
| bool | failed {false} |
| char const * | failure_message {nullptr} |
| Keep a message to inform what went wrong above. | |
Rosenbrock's function \( (a-x_1)^2 + b(x_2-x_1^2)^2 \) with defaults \( a=1, b=100 \). Two-dimensional; its curved banana valley stresses line search and step control. Minimum at \( (a, a^2) \).
Definition at line 732 of file MiniTensor_TestFunctions.h.
| using minitensor::Rosenbrock< S, M >::Base = Function_Base<Rosenbrock<S, M>, S, M> |
Base class type.
Definition at line 756 of file MiniTensor_TestFunctions.h.
|
inline |
Constructor.
| a | Location parameter; the minimizer is \( (a, a^2) \). |
| b | Weight of the valley (coupling) term. |
Definition at line 742 of file MiniTensor_TestFunctions.h.
|
inline |
Objective value.
Definition at line 764 of file MiniTensor_TestFunctions.h.
|
inline |
Gradient of the objective.
Definition at line 781 of file MiniTensor_TestFunctions.h.
|
inline |
Hessian of the objective.
Definition at line 792 of file MiniTensor_TestFunctions.h.
|
staticconstexpr |
Function name.
Definition at line 751 of file MiniTensor_TestFunctions.h.
|
private |
Location parameter.
Definition at line 802 of file MiniTensor_TestFunctions.h.
|
private |
Weight of the valley (coupling) term.
Definition at line 808 of file MiniTensor_TestFunctions.h.