info_flags::expanded added [A.Sheplyakov]
authorJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 27 Aug 2007 16:35:35 +0000 (16:35 +0000)
committerJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 27 Aug 2007 16:35:35 +0000 (16:35 +0000)
ginac/expairseq.cpp
ginac/flags.h
ginac/numeric.cpp
ginac/power.cpp
ginac/symbol.cpp

index 4dffafac0806ee747c0004babbcb39aa005ee55b..757f3c3989a62bf6b46378e41367a90974555010 100644 (file)
@@ -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);
 }
 
index a416958d1511a7133b09ece92a8adeebfd2b1ba7..86d823844f80558242cd3bb18bfc7e148270758e 100644 (file)
@@ -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
        };
 };
 
index 1858cbd9efe927533347c5fee45160f56d496758..ef61ce75b55e3d86be334982e80d0b9c93fef157 100644 (file)
@@ -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();
index 8829bbae597788f6908e2c4739d68da24ea42619..faaef1842d6e085faa12288448a0231cbb1733b2 100644 (file)
@@ -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);
 }
index a84ae4a42623bf915af1ad037abd99b1335c3803..9f3b1c62df576c4afeaa04f68ed58f9ff6ee978e 100644 (file)
@@ -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;