Dune Core Modules (2.9.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... | |
Detailed Description
template<class Range, class Domain, class F, class FunctionInterface>
class Dune::Functions::FunctionFromCallable< Range(Domain), F, FunctionInterface >
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, ...
- Template Parameters
-
Range Range type Domain Domain type F Type of wrapped function FunctionInterface Interface to implement, this can be either Dune::Function or Dune::VirtualFunction
Constructor & Destructor Documentation
◆ FunctionFromCallable() [1/2]
|
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.
- Parameters
-
f Callable object to use for evaluate()
◆ FunctionFromCallable() [2/2]
|
inline |
Create VirtualFunction from callable object.
This will store the given function and pass evaluate() to its operator(). This constructor copies the given function.
- Parameters
-
f Callable object to use for evaluate()
Member Function Documentation
◆ evaluate()
|
inline |
Evaluate function.
This call is passed to the function
The documentation for this class was generated from the following file:
- dune/functions/common/functionfromcallable.hh
