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

#include <MiniTensor_TestFunctions.h>

Inheritance diagram for minitensor::Mesa< S, M >:
minitensor::Function_Base< Mesa< S, 1 >, S, 1 >

Public Types

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

Public Member Functions

 Mesa ()
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< Mesa< S, 1 >, S, 1 >
 Function_Base ()
T value (Mesa< S, 1 > &f, Vector< T, N > const &x)
Vector< T, N > gradient (Mesa< S, 1 > &f, Vector< T, N > const &x)
Vector< T, N > residual (Mesa< S, 1 > &f, Vector< T, N > const &x)
Tensor< T, N > hessian (Mesa< S, 1 > &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 {"Mesa"}
Static Public Attributes inherited from minitensor::Function_Base< Mesa< S, 1 >, S, 1 >
static constexpr Index DIMENSION

Additional Inherited Members

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

Detailed Description

template<typename S, Index M = 1>
class minitensor::Mesa< S, M >

Mesa function: \( x^2 \) plus a plateau of height 100 on \( [-1, 1] \). One-dimensional, discontinuous and non-monotonic near the origin; tests monotonicity enforcement.

Definition at line 1156 of file MiniTensor_TestFunctions.h.

Member Typedef Documentation

◆ Base

template<typename S, Index M = 1>
using minitensor::Mesa< S, M >::Base = Function_Base<Mesa<S, M>, S, M>

Base class type.

Definition at line 1175 of file MiniTensor_TestFunctions.h.

Constructor & Destructor Documentation

◆ Mesa()

template<typename S, Index M = 1>
minitensor::Mesa< S, M >::Mesa ( )
inline

Constructor.

Definition at line 1163 of file MiniTensor_TestFunctions.h.

Member Function Documentation

◆ value()

template<typename S, Index M = 1>
template<typename T, Index N>
T minitensor::Mesa< S, M >::value ( Vector< T, N > const & X)
inline

Objective value.

Definition at line 1183 of file MiniTensor_TestFunctions.h.

◆ gradient()

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

Gradient of the objective.

Definition at line 1204 of file MiniTensor_TestFunctions.h.

◆ hessian()

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

Hessian of the objective.

Definition at line 1215 of file MiniTensor_TestFunctions.h.

Member Data Documentation

◆ NAME

template<typename S, Index M = 1>
char const* const minitensor::Mesa< S, M >::NAME {"Mesa"}
staticconstexpr

Function name.

Definition at line 1170 of file MiniTensor_TestFunctions.h.


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