GiNaC 1.8.10
GiNaC::Gt_detail::TransformExpressionWithCache< Type > Class Template Reference

#include <Gt_helpers.h>

Public Member Functions

 TransformExpressionWithCache (const std::function< ex(const ex &)> &func_obj, const std::function< ex(const ex &)> &func_default=[](const ex &obj) -> ex { return obj;})
ex operator() (const ex &input)
void print_cache () const
const exhashmap< ex > & get_cache () const
void clear_cache ()

Private Member Functions

ex impl (const ex &expr)

Static Private Member Functions

template<typename T = Type>
static std::enable_if< std::is_base_of< basic, T >::value, bool >::type check_type (const ex &expr)
template<typename T = Type>
static std::enable_if<!std::is_base_of< basic, T >::value, bool >::type check_type (const ex &expr)

Private Attributes

const std::function< ex(const ex &)> func_obj
const std::function< ex(const ex &)> func_default
exhashmap< excache

Detailed Description

template<typename Type>
class GiNaC::Gt_detail::TransformExpressionWithCache< Type >

Definition at line 37 of file Gt_helpers.h.

Constructor & Destructor Documentation

◆ TransformExpressionWithCache()

template<typename Type>
GiNaC::Gt_detail::TransformExpressionWithCache< Type >::TransformExpressionWithCache ( const std::function< ex(const ex &)> & func_obj,
const std::function< ex(const ex &)> & func_default = [](const ex& obj) -> ex { return obj; } )
inline

Definition at line 40 of file Gt_helpers.h.

References func_default, and func_obj.

Member Function Documentation

◆ operator()()

template<typename Type>
ex GiNaC::Gt_detail::TransformExpressionWithCache< Type >::operator() ( const ex & input)
inline

Definition at line 46 of file Gt_helpers.h.

References impl().

◆ print_cache()

template<typename Type>
void GiNaC::Gt_detail::TransformExpressionWithCache< Type >::print_cache ( ) const

Definition at line 58 of file Gt_helpers.cpp.

References cache.

◆ get_cache()

template<typename Type>
const exhashmap< ex > & GiNaC::Gt_detail::TransformExpressionWithCache< Type >::get_cache ( ) const
inline

Definition at line 50 of file Gt_helpers.h.

References cache.

◆ clear_cache()

template<typename Type>
void GiNaC::Gt_detail::TransformExpressionWithCache< Type >::clear_cache ( )
inline

Definition at line 51 of file Gt_helpers.h.

References cache.

◆ check_type() [1/2]

template<typename Type>
template<typename T>
std::enable_if<!std::is_base_of< basic, T >::value, bool >::type GiNaC::Gt_detail::TransformExpressionWithCache< Type >::check_type ( const ex & expr)
staticprivate

Definition at line 45 of file Gt_helpers.cpp.

References GiNaC::is_exactly_a().

Referenced by impl().

◆ check_type() [2/2]

template<typename Type>
template<typename T = Type>
std::enable_if<!std::is_base_of< basic, T >::value, bool >::type GiNaC::Gt_detail::TransformExpressionWithCache< Type >::check_type ( const ex & expr)
staticprivate

◆ impl()

template<typename Type>
ex GiNaC::Gt_detail::TransformExpressionWithCache< Type >::impl ( const ex & expr)
private

Member Data Documentation

◆ func_obj

template<typename Type>
const std::function<ex(const ex&)> GiNaC::Gt_detail::TransformExpressionWithCache< Type >::func_obj
private

Definition at line 65 of file Gt_helpers.h.

Referenced by impl(), and TransformExpressionWithCache().

◆ func_default

template<typename Type>
const std::function<ex(const ex&)> GiNaC::Gt_detail::TransformExpressionWithCache< Type >::func_default
private

Definition at line 66 of file Gt_helpers.h.

Referenced by impl(), and TransformExpressionWithCache().

◆ cache

template<typename Type>
exhashmap<ex> GiNaC::Gt_detail::TransformExpressionWithCache< Type >::cache
private

Definition at line 67 of file Gt_helpers.h.

Referenced by clear_cache(), get_cache(), impl(), and print_cache().


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

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.