![]() |
UtilsLite
Utilities for C++ programming
|
Abstract base class for defining mathematical functions used in the minimization algorithm. More...
#include <Utils_Trichotomy.hh>
Public Member Functions | |
virtual Real | eval (Real x) const =0 |
Real | operator() (Real x) const |
Abstract base class for defining mathematical functions used in the minimization algorithm.
This class serves as a base interface for user-defined functions that can be evaluated. It allows for the implementation the numerical method to find the minimum of the one dimensional equation \( f(x) \). Users must inherit from this class and implement the virtual method to define their specific functions.
Template Parameter:
Real
: A numeric type representing the data type of the function's input and output, such as float
, double
, etc.Usage Example: To create a custom function, derive from this class and implement the required methods. Here is an example for the function \( f(x) = x^2 - 2 \):
|
pure virtual |
Evaluate the function \( f(x) \)
[in] | x | the point to evaluate \( f(x) \) |
|
inline |
Evaluate the function \( f(x) \)
[in] | x | the point to evaluate \( f(x) \) |