dune-functions 2.9.0
|
Class storing differentiable functions using type erasure. More...
#include <dune/functions/common/differentiablefunction.hh>
Public Member Functions | |
template<class F , disableCopyMove< DifferentiableFunction, F > = 0> | |
DifferentiableFunction (F &&f) | |
Construct from function. More... | |
DifferentiableFunction ()=default | |
Default constructor. More... | |
Range | operator() (const Domain &x) const |
Evaluation of wrapped function. More... | |
Friends | |
DerivativeInterface | derivative (const DifferentiableFunction &t) |
Get derivative of wrapped function. More... | |
Class storing differentiable functions using type erasure.
Range | Range type |
Domain | Domain type |
DerivativeTraits | Traits class to determine range of derivative (defaults to DefaultDerivativeTraits) |
bufferSize | Size of stack buffer for small object optimization (defaults to 56) |
This models the Concept::DifferentiableFunction<Range(Domain), DerivativeTraits> concept. Small object optimization is used to store the given function. If its size exceed bufferSize
, memory will be allocated dynamically.
|
inline |
Construct from function.
F | Function type |
f | Function of type F |
Calling derivative(DifferentiableFunction) will result in an exception if the passed function does provide a free derivative() function found via ADL.
|
default |
Default constructor.
|
inline |
Evaluation of wrapped function.