Defines routines for substituting (parts of) an expression by another expression. More...
#include "viennamath/forwards.h"
#include "viennamath/runtime/functor_wrapper.hpp"
#include "viennamath/manipulation/simplify.hpp"
#include <assert.h>
Go to the source code of this file.
Data Structures | |
struct | substitute< SearchType, ReplacementType, ExpressionType > |
Default case for the compiletime substitution metafunction: Do not define any return type. This provides SFINAE for the interface function. More... | |
struct | substitute< SearchType, ReplacementType, ct_binary_expr< LHS, OP, RHS > > |
For a binary expression, the substitution is performed for both operands. More... | |
struct | substitute< SearchType, ReplacementType, ct_unary_expr< LHS, OP > > |
For a unary expression, the substitution is performed for the operand. More... | |
struct | substitute< SearchType, ReplacementType, ct_constant< value > > |
By default, a compiletime constant is left unmodified (no match). More... | |
struct | substitute< SearchType, ReplacementType, ct_function_symbol< TAG > > |
By default, a compiletime function symbol is left unmodified (no match). More... | |
struct | substitute< SearchType, ReplacementType, ct_variable< id > > |
By default, a compiletime variable is left unmodified (no match). More... | |
struct | substitute< ct_binary_expr< LHS, OP, RHS >, ReplacementType, ct_binary_expr< LHS, OP, RHS > > |
If there is a match for the binary expression, the replacement is returned. More... | |
struct | substitute< ct_unary_expr< LHS, OP >, ReplacementType, ct_unary_expr< LHS, OP > > |
If there is a match for the unary expression, the replacement is returned. More... | |
struct | substitute< ct_constant< value >, ReplacementType, ct_constant< value > > |
If there is a match for the compiletime constant, the replacement is returned. More... | |
struct | substitute< ct_function_symbol< TAG >, ReplacementType, ct_function_symbol< TAG > > |
If there is a match for the compiletime function symbol, the replacement is returned. More... | |
struct | substitute< ct_variable< id >, ReplacementType, ct_variable< id > > |
If there is a match for the compiletime variable, the replacement is returned. More... | |
class | integral_substitution_functor< InterfaceType > |
Namespaces | |
namespace | viennamath |
The main ViennaMath namespace. All types and functions for the user reside here. | |
namespace | viennamath::result_of |
The namespace containing a set of metafunctions which can be used by the ViennaMath library user. | |
namespace | viennamath::detail |
Implementation details for functionality in ViennaMath. Not intended for direct use. | |
Functions | |
template<typename SearchType , typename ReplacementType , typename ExpressionType > | |
result_of::substitute < SearchType, ReplacementType, ExpressionType >::type | substitute (SearchType const &, ReplacementType const &, ExpressionType const &ex) |
The generic interface function for compiletime substitution. | |
template<typename InterfaceType , typename ReplacementType , typename ExpressionType > | |
rt_expr< InterfaceType > | substitute (rt_variable< InterfaceType > const &u, ReplacementType const &repl, ExpressionType const &e) |
Replaces all occurances of the variable 'u' in the expression 'e' with 'repl'. | |
template<typename InterfaceType , typename ReplacementType > | |
rt_expr< InterfaceType > | substitute (rt_variable< InterfaceType > const &u, ReplacementType const &repl, rt_expr< InterfaceType > const &e) |
Replaces all occurances of the variable 'u' in the expression 'e' with 'repl'. | |
template<typename InterfaceType > | |
rt_expr< InterfaceType > | substitute (rt_variable< InterfaceType > const &u, default_numeric_type repl, rt_expr< InterfaceType > const &e) |
Replaces all occurances of the variable 'u' in the expression 'e' with 'repl'. | |
template<typename InterfaceType > | |
rt_expr< InterfaceType > | substitute (rt_function_symbol< InterfaceType > const &u, default_numeric_type repl, rt_expr< InterfaceType > const &e) |
Replaces all occurances of the function symbol 'u' in the expression 'e' with 'repl'. | |
template<typename InterfaceType > | |
rt_expr< InterfaceType > | substitute (rt_function_symbol< InterfaceType > const &u, rt_expr< InterfaceType > const &repl, rt_expr< InterfaceType > const &e) |
Replaces all occurances of the function symbol 'u' in the expression 'e' with 'repl'. | |
template<typename InterfaceType , typename ReplacementType > | |
rt_expr< InterfaceType > | substitute (rt_unary_expr< InterfaceType > const &search, ReplacementType const &repl, rt_expr< InterfaceType > const &e) |
Replaces all occurances of the unary expression 'search' in the expression 'e' with 'repl'. | |
template<typename InterfaceType > | |
rt_expr< InterfaceType > | substitute (rt_unary_expr< InterfaceType > const &search, rt_expr< InterfaceType > const &repl, rt_expr< InterfaceType > const &e) |
Replaces all occurances of the unary expression 'search' in the expression 'e' with 'repl'. | |
template<typename InterfaceType , typename ReplacementType > | |
rt_expr< InterfaceType > | substitute (rt_binary_expr< InterfaceType > const &search, ReplacementType const &repl, rt_expr< InterfaceType > const &e) |
Replaces all occurances of the binary expression 'search' in the expression 'e' with 'repl'. | |
template<typename InterfaceType > | |
rt_expr< InterfaceType > | substitute (rt_expr< InterfaceType > const &search, rt_expr< InterfaceType > const &repl, rt_expr< InterfaceType > const &e) |
Replaces all occurances of the expression 'search' in the expression 'e' with 'repl'. | |
template<typename InterfaceType > | |
rt_expr< InterfaceType > | substitute (std::vector< rt_expr< InterfaceType > > const &search, std::vector< rt_expr< InterfaceType > > const &repl, rt_expr< InterfaceType > const &e) |
Replaces all occurances of the the expressions in 'search' in the expression 'e' with the corresponding expressions in 'repl'. | |
template<typename InterfaceType , typename PairType > | |
rt_expr< InterfaceType > | substitute (rt_symbolic_interval< InterfaceType > const &search, PairType const &repl, rt_expr< InterfaceType > const &e) |
Substitutes a symbolic interval with a concrete interval. |
Defines routines for substituting (parts of) an expression by another expression.