|
dune-functions
2.5.0
|
Wrap a callable object as Dune::Function or Dune::VirtualFunction. More...
#include <dune/functions/common/functionfromcallable.hh>

Public Member Functions | |
| FunctionFromCallable (F &&f) | |
| Create VirtualFunction from callable object. More... | |
| FunctionFromCallable (const F &f) | |
| Create VirtualFunction from callable object. More... | |
| void | evaluate (const Domain &x, Range &y) const |
| Evaluate function. More... | |
Wrap a callable object as Dune::Function or Dune::VirtualFunction.
You can use this to implement a DifferentiableFunction including a variable number of derivatives using callable objects. All types that can be assigned to std::function<Range(Domain)> are supported, i.e. functions, functors, lambdas, ...
| Range | Range type |
| Domain | Domain type |
| F | Type of wrapped function |
| FunctionInterface | Interface to implement, this can be either Dune::Function or Dune::VirtualFunction |
|
inline |
Create VirtualFunction from callable object.
This will store the given function and pass evaluate() to its operator(). This constructor moves data from given function.
| f | Callable object to use for evaluate() |
|
inline |
Create VirtualFunction from callable object.
This will store the given function and pass evaluate() to its operator(). This constructor copies the given function.
| f | Callable object to use for evaluate() |
|
inline |
Evaluate function.
This call is passed to the function
1.8.12