|
MiniTensor Version of the Day
|
#include <MiniTensor_TestFunctions.h>
Public Types | |
| using | Base = Function_Base< Gaussian< S, M >, S, M > |
Public Member Functions | |
| Gaussian (S const a, S const b, S const c) | |
| 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< 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 {"Inverted Gaussian"} |
Static Public Attributes inherited from minitensor::Function_Base< FunctionDerived, S, M > | |
| static constexpr Index | DIMENSION {M} |
Private Attributes | |
| S const | a_ {0.0} |
| S const | b_ {0.0} |
| S const | c_ {0.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. | |
Inverted Gaussian NLS: the residual is the gradient of \( -e^{-c^2((x_1-a)^2+(x_2-b)^2)} \) scaled by \( c \). Two-dimensional; minimum at \( (a, b) \), nearly flat away from it, stressing globalization.
Definition at line 216 of file MiniTensor_TestFunctions.h.
| using minitensor::Gaussian< S, M >::Base = Function_Base<Gaussian<S, M>, S, M> |
Base class type.
Definition at line 239 of file MiniTensor_TestFunctions.h.
|
inline |
Constructor.
| a | First coordinate of the center (minimizer). |
| b | Second coordinate of the center (minimizer). |
| c | Inverse width of the Gaussian. |
Definition at line 225 of file MiniTensor_TestFunctions.h.
|
inline |
Objective value.
Definition at line 247 of file MiniTensor_TestFunctions.h.
|
inline |
Gradient of the objective.
Definition at line 258 of file MiniTensor_TestFunctions.h.
|
inline |
Hessian of the objective.
Definition at line 289 of file MiniTensor_TestFunctions.h.
|
staticconstexpr |
Function name.
Definition at line 234 of file MiniTensor_TestFunctions.h.
|
private |
First coordinate of the center.
Definition at line 299 of file MiniTensor_TestFunctions.h.
|
private |
Second coordinate of the center.
Definition at line 305 of file MiniTensor_TestFunctions.h.
|
private |
Inverse width of the Gaussian.
Definition at line 311 of file MiniTensor_TestFunctions.h.