From 47923e5885d0e437d6cbe257c25f9bca757ea001 Mon Sep 17 00:00:00 2001 From: Jens Vollinga Date: Mon, 27 Aug 2007 16:35:35 +0000 Subject: [PATCH 1/1] info_flags::expanded added [A.Sheplyakov] --- ginac/expairseq.cpp | 2 ++ ginac/flags.h | 5 ++++- ginac/numeric.cpp | 1 + ginac/power.cpp | 2 ++ ginac/symbol.cpp | 3 ++- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ginac/expairseq.cpp b/ginac/expairseq.cpp index 4dffafac..757f3c39 100644 --- a/ginac/expairseq.cpp +++ b/ginac/expairseq.cpp @@ -267,6 +267,8 @@ void expairseq::do_print_tree(const print_tree & c, unsigned level) const bool expairseq::info(unsigned inf) const { + if (inf == info_flags::expanded) + return (flags & status_flags::expanded); return inherited::info(inf); } diff --git a/ginac/flags.h b/ginac/flags.h index a416958d..86d82384 100644 --- a/ginac/flags.h +++ b/ginac/flags.h @@ -250,7 +250,10 @@ public: has_indices, // object has at least one index // answered by class idx - idx + idx, + + // answered by classes numeric, symbol, add, mul, power + expanded }; }; diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp index 1858cbd9..ef61ce75 100644 --- a/ginac/numeric.cpp +++ b/ginac/numeric.cpp @@ -576,6 +576,7 @@ bool numeric::info(unsigned inf) const case info_flags::numeric: case info_flags::polynomial: case info_flags::rational_function: + case info_flags::expanded: return true; case info_flags::real: return is_real(); diff --git a/ginac/power.cpp b/ginac/power.cpp index 8829bbae..faaef184 100644 --- a/ginac/power.cpp +++ b/ginac/power.cpp @@ -231,6 +231,8 @@ bool power::info(unsigned inf) const case info_flags::algebraic: return !exponent.info(info_flags::integer) || basis.info(inf); + case info_flags::expanded: + return (flags & status_flags::expanded); } return inherited::info(inf); } diff --git a/ginac/symbol.cpp b/ginac/symbol.cpp index a84ae4a4..9f3b1c62 100644 --- a/ginac/symbol.cpp +++ b/ginac/symbol.cpp @@ -214,7 +214,8 @@ bool symbol::info(unsigned inf) const inf == info_flags::cinteger_polynomial || inf == info_flags::rational_polynomial || inf == info_flags::crational_polynomial || - inf == info_flags::rational_function) + inf == info_flags::rational_function || + inf == info_flags::expanded) return true; if (inf == info_flags::real) return domain==domain::real || domain==domain::positive; -- 2.44.0