X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;ds=sidebyside;f=ginac%2Ffunction.cppy;h=dba9f4e0f096b8234234e540c109484ebdf260f8;hb=679208b372d0d1ba9a50cf277530bf0950cb3a90;hp=fb83cdc4f05b1f2683589a87e2f4d8fb928504d9;hpb=a2314765ecb37b89ce5ab0d5491e58b6ac550b73;p=ginac.git diff --git a/ginac/function.cppy b/ginac/function.cppy index fb83cdc4..dba9f4e0 100644 --- a/ginac/function.cppy +++ b/ginac/function.cppy @@ -7,7 +7,7 @@ * Please do not modify it directly, edit function.cppy instead! * function.py options: maxargs=@maxargs@ * - * GiNaC Copyright (C) 1999-2010 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -78,8 +78,9 @@ 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 = expl_derivative_f = power_f = series_f = 0; + info_f = 0; evalf_params_first = true; use_return_type = false; eval_use_exvector_args = false; @@ -87,10 +88,13 @@ 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; + expl_derivative_use_exvector_args = false; power_use_exvector_args = false; series_use_exvector_args = false; print_use_exvector_args = false; + info_use_exvector_args = false; use_remember = false; functions_with_same_name = 1; symtree = 0; @@ -360,15 +364,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) { @@ -602,6 +597,31 @@ ex function::imag_part() const throw(std::logic_error("function::imag_part(): invalid nparams")); } +/** Implementation of ex::info for functions. */ +bool function::info(unsigned inf) const +{ + GINAC_ASSERT(serial & function::registered_functions() { static std::vector rf = std::vector();