X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Ffunction.cppy;h=2a9080cf698e43d519bce298bdc435833250125c;hp=fb83cdc4f05b1f2683589a87e2f4d8fb928504d9;hb=4e1e7c6547dafc0b0f8695f9eced2591ae816a31;hpb=d916416984a857e80962239a0ee93e7216f803bb diff --git a/ginac/function.cppy b/ginac/function.cppy index fb83cdc4..2a9080cf 100644 --- a/ginac/function.cppy +++ b/ginac/function.cppy @@ -78,8 +78,8 @@ void function_options::initialize() { set_name("unnamed_function", "\\\\mbox{unnamed}"); nparams = 0; - eval_f = evalf_f = real_part_f = imag_part_f = conjugate_f = derivative_f - = power_f = series_f = 0; + eval_f = evalf_f = real_part_f = imag_part_f = conjugate_f = expand_f + = derivative_f = power_f = series_f = 0; evalf_params_first = true; use_return_type = false; eval_use_exvector_args = false; @@ -87,6 +87,7 @@ void function_options::initialize() conjugate_use_exvector_args = false; real_part_use_exvector_args = false; imag_part_use_exvector_args = false; + expand_use_exvector_args = false; derivative_use_exvector_args = false; power_use_exvector_args = false; series_use_exvector_args = false; @@ -360,15 +361,6 @@ next_context: } } -ex function::expand(unsigned options) const -{ - // Only expand arguments when asked to do so - if (options & expand_options::expand_function_args) - return inherited::expand(options); - else - return (options == 0) ? setflag(status_flags::expanded) : *this; -} - ex function::eval(int level) const { if (level>1) { @@ -756,6 +748,34 @@ ex function::power(const ex & power_param) const // power of function throw(std::logic_error("function::power(): no power function defined")); } +ex function::expand(unsigned options) const +{ + GINAC_ASSERT(serial & function::registered_functions() { static std::vector rf = std::vector();