dune-functions 2.9.0
Public Member Functions | Friends | List of all members
Dune::Functions::DifferentiableFunction< Range(Domain), DerivativeTraits, bufferSize > Class Template Reference

Class storing differentiable functions using type erasure. More...

#include <dune/functions/common/differentiablefunction.hh>

Inheritance diagram for Dune::Functions::DifferentiableFunction< Range(Domain), DerivativeTraits, bufferSize >:
Inheritance graph

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...
 

Detailed Description

template<class Range, class Domain, template< class > class DerivativeTraits, size_t bufferSize>
class Dune::Functions::DifferentiableFunction< Range(Domain), DerivativeTraits, bufferSize >

Class storing differentiable functions using type erasure.

Template Parameters
RangeRange type
DomainDomain type
DerivativeTraitsTraits class to determine range of derivative (defaults to DefaultDerivativeTraits)
bufferSizeSize 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.

Constructor & Destructor Documentation

◆ DifferentiableFunction() [1/2]

template<class Range , class Domain , template< class > class DerivativeTraits, size_t bufferSize>
template<class F , disableCopyMove< DifferentiableFunction, F > = 0>
Dune::Functions::DifferentiableFunction< Range(Domain), DerivativeTraits, bufferSize >::DifferentiableFunction ( F &&  f)
inline

Construct from function.

Template Parameters
FFunction type
Parameters
fFunction of type F

Calling derivative(DifferentiableFunction) will result in an exception if the passed function does provide a free derivative() function found via ADL.

◆ DifferentiableFunction() [2/2]

template<class Range , class Domain , template< class > class DerivativeTraits, size_t bufferSize>
Dune::Functions::DifferentiableFunction< Range(Domain), DerivativeTraits, bufferSize >::DifferentiableFunction ( )
default

Default constructor.

Member Function Documentation

◆ operator()()

template<class Range , class Domain , template< class > class DerivativeTraits, size_t bufferSize>
Range Dune::Functions::DifferentiableFunction< Range(Domain), DerivativeTraits, bufferSize >::operator() ( const Domain &  x) const
inline

Evaluation of wrapped function.


The documentation for this class was generated from the following file: