X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Foperators.cpp;h=0ce17b6661e700778cf2063800514175a54da617;hb=48a6c5094dd4ff641d0875b1303cfa8b2b489da1;hp=1a1b6de497232d0b0cb5b8b34bc23318198ccbc4;hpb=a57c586be1fb226e9dd234b481c6b1da91013925;p=ginac.git diff --git a/ginac/operators.cpp b/ginac/operators.cpp index 1a1b6de4..0ce17b66 100644 --- a/ginac/operators.cpp +++ b/ginac/operators.cpp @@ -3,7 +3,7 @@ * Implementation of GiNaC's overloaded operators. */ /* - * GiNaC Copyright (C) 1999-2005 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 @@ -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);