]> www.ginac.de Git - ginac.git/blobdiff - ginac/symbol.cpp
info_flags::expanded added [A.Sheplyakov]
[ginac.git] / ginac / symbol.cpp
index 7e3b49d8bc7c0e59bcecf4c4034cfaaed1050a47..9f3b1c62df576c4afeaa04f68ed58f9ff6ee978e 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's symbolic objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2006 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2007 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
@@ -57,6 +57,13 @@ realsymbol::realsymbol()
        domain = domain::real;
 }
 
+// possymbol
+
+possymbol::possymbol()
+{
+       domain = domain::positive;
+}
+
 //////////
 // other constructors
 //////////
@@ -103,6 +110,20 @@ realsymbol::realsymbol(const std::string & initname, unsigned rt, tinfo_t rtt, u
 realsymbol::realsymbol(const std::string & initname, const std::string & texname, unsigned rt, tinfo_t rtt, unsigned domain)
  : symbol(initname, texname, rt, rtt, domain) { }
 
+// possymbol
+       
+possymbol::possymbol(const std::string & initname, unsigned domain)
+ : symbol(initname, domain) { }
+
+possymbol::possymbol(const std::string & initname, const std::string & texname, unsigned domain)
+ : symbol(initname, texname, domain) { }
+
+possymbol::possymbol(const std::string & initname, unsigned rt, tinfo_t rtt, unsigned domain)
+ : symbol(initname, rt, rtt, domain) { }
+
+possymbol::possymbol(const std::string & initname, const std::string & texname, unsigned rt, tinfo_t rtt, unsigned domain)
+ : symbol(initname, texname, rt, rtt, domain) { }
+
 //////////
 // archiving
 //////////
@@ -193,11 +214,12 @@ 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;
-       if (inf == info_flags::nonnegative)
+       if (inf == info_flags::positive || inf == info_flags::nonnegative)
                return domain == domain::positive;
        else
                return inherited::info(inf);