]> www.ginac.de Git - ginac.git/blobdiff - ginac/operators.cpp
Support for exset and printing thereof.
[ginac.git] / ginac / operators.cpp
index 1a1b6de497232d0b0cb5b8b34bc23318198ccbc4..d75496593f5b2dd3c1d141ade93b3e441e848566 100644 (file)
@@ -377,6 +377,33 @@ std::ostream & operator<<(std::ostream & os, const exvector & e)
        return os;
 }
 
+std::ostream & operator<<(std::ostream & os, const exset & e)
+{
+       print_context *p = get_print_context(os);
+       exset::const_iterator i = e.begin();
+       exset::const_iterator send = e.end();
+
+       if (i==send) {
+               os << "<>";
+               return os;
+       }
+
+       os << "<";
+       while (true) {
+               if (p == 0)
+                       i->print(print_dflt(os));
+               else
+                       i->print(*p);
+               ++i;
+               if (i == send)
+                       break;
+               os << ",";
+       }
+       os << ">";
+
+       return os;
+}
+
 std::ostream & operator<<(std::ostream & os, const exmap & e)
 {
        print_context *p = get_print_context(os);