|
lsst.afw
13.0-98-g5a654715e+2
|
Abstract base class for function objects. More...
#include <Functor.h>
Public Member Functions | |
| Functor (std::string const &name) | |
| virtual | ~Functor () |
| virtual std::shared_ptr< Functor > | clone () const =0 |
| virtual double | operator() (double x) const =0 |
| virtual double | inverse (double y, double tol=1e-10, unsigned int maxiter=1000) const |
| virtual double | derivative (double x) const =0 |
Abstract base class for function objects.
A default implementation of the inverse(...) member function is provided that computes the inverse of the function using the Newton-Raphson method. Concrete subclasses must therefore implement a derivative(...) member function. In cases where the function is analytically invertible, the inverse(...) function should be re-implemented in the subclass using the analytic expression.
|
explicit |
| name | The name of the concrete subclass of this class. Used in the exception message from the inverse(...) member function. |
|
inlinevirtual |
|
pure virtual |
Implemented in lsst::afw::geom::LinearFunctor.
|
pure virtual |
Implemented in lsst::afw::geom::LinearFunctor.
|
virtual |
| y | desired value of functor |
| tol | Convergence tolerance for the Newton-Raphson search such that abs(x_{iter} - x_{iter-1}) < tol. |
| maxiter | Maximum number of iterations in the N-R search. |
| lsst::pex::exceptions::OutOfRangeError | if (tol <= 0) or (tol > 1) or (maxiter < 1). |
| lsst::pex::exceptions::RuntimeError | if the number of N-R iterations > maxiter. |
|
pure virtual |
Implemented in lsst::afw::geom::LinearFunctor.
1.8.5