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

#include <MiniTensor_TestFunctions.h>

Inheritance diagram for minitensor::Booth< S, M >:
minitensor::Function_Base< FunctionDerived, S, M >

Public Types

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

Public Member Functions

 Booth ()
 
template<typename T , Index N>
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>
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 {"Booth"}
 
- Static Public Attributes inherited from minitensor::Function_Base< FunctionDerived, S, M >
static constexpr Index DIMENSION {M}
 

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.
 

Detailed Description

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

Booth's function \( (x+2y-7)^2 + (2x+y-5)^2 \). Two-dimensional, convex quadratic; minimum at \( (1, 3) \).

Definition at line 905 of file MiniTensor_TestFunctions.h.

Member Typedef Documentation

◆ Base

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

Base class type.

Definition at line 924 of file MiniTensor_TestFunctions.h.

Constructor & Destructor Documentation

◆ Booth()

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

Constructor.

Definition at line 912 of file MiniTensor_TestFunctions.h.

Member Function Documentation

◆ value()

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

Objective value.

Definition at line 932 of file MiniTensor_TestFunctions.h.

◆ gradient()

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

Gradient of the objective.

Definition at line 960 of file MiniTensor_TestFunctions.h.

◆ hessian()

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

Hessian of the objective.

Definition at line 971 of file MiniTensor_TestFunctions.h.

Member Data Documentation

◆ NAME

template<typename S , Index M = 2>
constexpr char const* const minitensor::Booth< S, M >::NAME {"Booth"}
staticconstexpr

Function name.

Definition at line 919 of file MiniTensor_TestFunctions.h.


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