Loading...
Searching...
No Matches
Dune::Functions::DifferentiableFunction< Range(Domain), DerivativeTraits, bufferSize > Class Template Reference
Functions » Function interface wrappers

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

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

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

## Public Member Functions

template<class F, disableCopyMove< DifferentiableFunction, F > = 0>
| DifferentiableFunction (F &&f)
| Construct from function.
| DifferentiableFunction ()=default
| Default constructor.
Range | operator() (const Domain &x) const
| Evaluation of wrapped function.

## Friends

DerivativeInterface | derivative (const DifferentiableFunction &t)
| Get derivative of wrapped function.

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

  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.

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

  F | Function type

Parameters

  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.

## 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:

- differentiablefunction.hh