X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;ds=sidebyside;f=ginac%2Ffunction.pl;h=d75e8f645ebf3e359d565067837b31ba60d7a174;hb=2dcbb3a4955e294d62b45c3db8bdccb7d6fdf833;hp=ad77345da731fe89e9c3cd1acd52f0dc13566a33;hpb=cfea748404dec5fb2f2e3310d36eeb6640f13824;p=ginac.git diff --git a/ginac/function.pl b/ginac/function.pl index ad77345d..d75e8f64 100755 --- a/ginac/function.pl +++ b/ginac/function.pl @@ -164,7 +164,7 @@ $interface=<(VAR)) { \\ - automatic_typecheck=false; \\ -} else - -#define TYPECHECK_INTEGER(VAR) \\ -if (!(VAR).info(GiNaC::info_flags::integer)) { \\ - automatic_typecheck=false; \\ -} else - -#define END_TYPECHECK(RV) \\ -{} \\ -if (!automatic_typecheck) { \\ - return RV.hold(); \\ -} - namespace GiNaC { class function; @@ -342,9 +320,6 @@ $constructors_interface public: void print(const print_context & c, unsigned level = 0) const; unsigned precedence(void) const {return 70;} - int degree(const ex & s) const; - int ldegree(const ex & s) const; - ex coeff(const ex & s, int n = 1) const; ex expand(unsigned options=0) const; ex eval(int level=0) const; ex evalf(int level=0) const; @@ -390,7 +365,7 @@ template<> inline bool is_exactly_a(const basic & obj) } #define is_ex_the_function(OBJ, FUNCNAME) \\ - (is_exactly_a(OBJ) && ex_to(OBJ).get_serial() == function_index_##FUNCNAME) + (GiNaC::is_exactly_a(OBJ) && GiNaC::ex_to(OBJ).get_serial() == function_index_##FUNCNAME) } // namespace GiNaC @@ -408,7 +383,7 @@ $implementation=< #include #include #include @@ -740,24 +716,6 @@ ex function::expand(unsigned options) const return (options == 0) ? setflag(status_flags::expanded) : *this; } -int function::degree(const ex & s) const -{ - return is_equal(ex_to(s)) ? 1 : 0; -} - -int function::ldegree(const ex & s) const -{ - return is_equal(ex_to(s)) ? 1 : 0; -} - -ex function::coeff(const ex & s, int n) const -{ - if (is_equal(ex_to(s))) - return n==1 ? _ex1 : _ex0; - else - return n==0 ? ex(*this) : _ex0; -} - ex function::eval(int level) const { GINAC_ASSERT(serial