11 #ifndef __INVERSE_FUNCTION_H 12 #define __INVERSE_FUNCTION_H 14 #include "../../Core/Functions.h" 15 #include "../../Core/InterpSolutionIterator.h" 16 #include <gsl/gsl_roots.h> 51 friend double gsl_f(
double x,
void *params);
54 friend double gsl_df(
double x,
void *params);
57 friend void gsl_fdf(
double x,
void *params,
double *f,
double *df);
64 double tolerance = 1e-10);
73 "Upper end of inverse function range is unknown." 81 "Lower end of inverse function range is unknown." 90 "Finding all solutinos of an inverse function not implemented." friend double gsl_df(double x, void *params)
GLS format derivative of function to invert.
const Core::OneArgumentDiffFunction & __to_invert
The function being inverted.
gsl_function __solver_f
The f argument used by the GSL solver.
A class representing a once differentiable function of a single argument.
double operator()(double x) const
The value of the function at the given abscissa.
An iterator over a set of solutions to an interpolating function.
friend void gsl_fdf(double x, void *params, double *f, double *df)
GLS format function and its derivative to invert.
double range_high() const
The lower end of the range over which the function is defined is uknown.
A class representing arbitrary order derivatives of a function.
double __target
The value we are trying to match the function to.
Core::InterpSolutionIterator crossings(double=0) const
An iterator over the abscissas where the function takes the given y value.
InverseFunction(const OneArgumentDiffFunction &to_invert, double search_min, double search_max, double tolerance=1e-10)
Invert the given function.
double __search_min
The range which to search for a solution (must bracket a zero).
The invrse of an existing function.
double range_low() const
The upper end of the range over which the function is defined.
const Core::FunctionDerivatives * deriv(double x) const
Returns a pointer to the derivative of the function.
gsl_function_fdf __solver_fdf
The fdf argument used by the GSL solver.
friend double gsl_f(double x, void *params)
GLS format function to invert.
gsl_root_fsolver * __solver
The GSL derivative-based solver.
double __tolerance
The relative tolerance in the value returned by the function at the best guess for the solution...