![]() |
UtilsLite
Utilities for C++ programming
|
Abstract base class for defining mathematical functions used in the zero search algorithm. More...
#include <Utils_AlgoHNewton.hh>
Public Member Functions | |
virtual Real | eval (Real x) const =0 |
virtual Real | D (Real x) const =0 |
Abstract base class for defining mathematical functions used in the zero search 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 solution of the one dimensional equation \( f(x) = 0 \). 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) \) |
|
pure virtual |
Evaluate the function \( f(x) \)
[in] | x | the point to evaluate \( f(x) \) |