3#ifndef DUNE_FUNCTIONS_COMMON_DIFFERENTIABLE_FUNCTION_HH
4#define DUNE_FUNCTIONS_COMMON_DIFFERENTIABLE_FUNCTION_HH
8#include <dune/common/typeutilities.hh>
27template<
class Signature,
template<
class>
class DerivativeTraits=DefaultDerivativeTraits,
size_t bufferSize=56>
37 template<
class S,
template<
class>
class DerivativeTraits,
size_t bufferSize>
38 struct DifferentiableFunctionTraits
56 using Concept = DifferentiableFunctionWrapperInterface<Signature, DerivativeInterface>;
60 using Model = DifferentiableFunctionWrapperImplementation<Signature, DerivativeInterface, B>;
80template<
class Range,
class Domain,
template<
class>
class DerivativeTraits,
size_t bufferSize>
83 typename Imp::DifferentiableFunctionTraits<Range(Domain), DerivativeTraits, bufferSize>::Concept,
84 Imp::DifferentiableFunctionTraits<Range(Domain), DerivativeTraits, bufferSize>::template Model>
86 using Traits = Imp::DifferentiableFunctionTraits<Range(Domain), DerivativeTraits, bufferSize>;
105 template<
class F, disableCopyMove<DifferentiableFunction, F> = 0 >
107 Base(std::forward<F>(f))
109 static_assert(Dune::Functions::Concept::isFunction<F, Range(Domain)>(),
"Trying to construct a DifferentiableFunction from type that does not model the Function concept");
118 Range operator() (
const Domain& x)
const
120 return this->asInterface().operator()(x);
132 return t.asInterface().derivative();
friend DerivativeInterface derivative(const DifferentiableFunction &t)
Get derivative of wrapped function.
Definition: differentiablefunction.hh:130
Definition: polynomial.hh:10
Definition: differentiablefunction.hh:29
DifferentiableFunction(F &&f)
Construct from function.
Definition: differentiablefunction.hh:106
DifferentiableFunction()=default
Default constructor.
Helper class to deduce the signature of a callable.
Definition: signature.hh:56
Base class for type-erased interface wrapper.
Definition: typeerasure.hh:165