MiniTensor Version of the Day
Loading...
Searching...
No Matches
minitensor::Function_Base< FunctionDerived, S, M > Struct Template Reference

#include <MiniTensor_Solvers.h>

Inheritance diagram for minitensor::Function_Base< FunctionDerived, S, M >:
minitensor::Banana< S, M > minitensor::Beale< S, M > minitensor::Booth< S, M > minitensor::Failure< S, M > minitensor::Gaussian< S, M > minitensor::GoldsteinPrice< S, M > minitensor::Matyas< S, M > minitensor::McCormick< S, M > minitensor::Mesa< S, M > minitensor::Paraboloid< S, M > minitensor::Quadratic< S, M > minitensor::Rosenbrock< S, M > minitensor::Sigmoid< S, M > minitensor::SquareRoot< S, M > minitensor::StyblinskiTang< S, M >

Public Member Functions

 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 Index DIMENSION {M}
 

Protected Attributes

bool failed {false}
 
char const * failure_message {nullptr}
 Keep a message to inform what went wrong above.
 

Detailed Description

template<typename FunctionDerived, typename S, Index M>
struct minitensor::Function_Base< FunctionDerived, S, M >

Function base class that defines the interface to Mini Solvers. The dimensions M and N are different in case vectors are passed to the methods that have different capacity. They must have dimension N.

Definition at line 36 of file MiniTensor_Solvers.h.


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