GiNaC 1.8.10
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
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.

Member Function Documentation

◆ operator()()

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

◆ 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, and n.

◆ get_cache()

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

◆ clear_cache()

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

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

◆ check_type() [2/2]

template<typename Type >
template<typename T = Type>
static 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.

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

◆ cache

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

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.