NuTo
Numerics Tool
Public Member Functions | List of all members
NuTo::NaturalCoordinateMemoizerMap< TResult, TNaturalCoords, TCompare > Class Template Reference

#include <NaturalCoordinateMemoizer.h>

Public Member Functions

 NaturalCoordinateMemoizerMap (std::function< TResult(TNaturalCoords)> function)
 ctor More...
 
const TResult & Get (const TNaturalCoords &v) const
 returns the value of the function for the given arguments. More...
 
void ClearCache () const
 

Constructor & Destructor Documentation

template<typename TResult , typename TNaturalCoords , typename TCompare = CompareVector<TNaturalCoords>>
NuTo::NaturalCoordinateMemoizerMap< TResult, TNaturalCoords, TCompare >::NaturalCoordinateMemoizerMap ( std::function< TResult(TNaturalCoords)>  function)
inline

ctor

Parameters
functionfunction for memoization

Member Function Documentation

template<typename TResult , typename TNaturalCoords , typename TCompare = CompareVector<TNaturalCoords>>
void NuTo::NaturalCoordinateMemoizerMap< TResult, TNaturalCoords, TCompare >::ClearCache ( ) const
inline
template<typename TResult , typename TNaturalCoords , typename TCompare = CompareVector<TNaturalCoords>>
const TResult& NuTo::NaturalCoordinateMemoizerMap< TResult, TNaturalCoords, TCompare >::Get ( const TNaturalCoords &  v) const
inline

returns the value of the function for the given arguments.

Repeated calls of Get() with the same arguments will return the memoized result.

Parameters
vargument
Returns
reference to the 'memoized' result

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