Lambda wrapper for scalar functions with value and derivative. Wraps a lambda/callable into a functor with Values() method.
More...
#include <MathUtils_FunctorScalar.hxx>
template<
typename Lambda>
class MathUtils::ScalarLambdaWithDerivative< Lambda >
Lambda wrapper for scalar functions with value and derivative. Wraps a lambda/callable into a functor with Values() method.
Usage:
return true;
});
GLint GLint GLint GLint GLint x
Definition OpenGl_glext.h:125
ScalarLambdaWithDerivative(Lambda theLambda)
Constructor from lambda/callable.
Definition MathUtils_FunctorScalar.hxx:87
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
MathUtils::ScalarResult Newton(Function &theFunc, double theGuess, const MathUtils::Config &theConfig=MathUtils::Config())
Newton-Raphson root finding algorithm. Finds x such that f(x) = 0 using Newton's method with derivati...
Definition MathRoot_Newton.hxx:45
- Template Parameters
-
| Lambda | callable type with signature bool(double, double&, double&) |
◆ ScalarLambdaWithDerivative()
Constructor from lambda/callable.
- Parameters
-
| theLambda | callable with signature bool(double theX, double& theY, double& theDY) |
◆ Value()
Evaluates only the function value (for algorithms that don't need derivative).
- Parameters
-
| [in] | theX | input value |
| [out] | theY | function value f(theX) |
- Returns
- true if evaluation succeeded
◆ Values()
Evaluates function and derivative at theX.
- Parameters
-
| [in] | theX | input value |
| [out] | theY | function value f(theX) |
| [out] | theDY | derivative value f'(theX) |
- Returns
- true if evaluation succeeded
The documentation for this class was generated from the following file: