Class MEAL::Cached

template<class T>
class Cached : public MEAL::CalculatePolicy<T>

This evaluation policy uses previously cached results when possible.

This class re-computes the cached values of the result and gradient only if the context has been altered.

Public Functions

inline Cached(T *context)

Default constructor.

inline Result evaluate(std::vector<Result> *gradient = 0) const

Implement the evaluate method of the Function.

inline std::string class_name() const

Return the name of the class for debugging.