X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Foperators.cpp;h=c5972c6ce9acc946a393a9aa59b75548b4f604b4;hp=1a1b6de497232d0b0cb5b8b34bc23318198ccbc4;hb=619879b5bd86a99334affe1f05d17616cc2c1898;hpb=a57c586be1fb226e9dd234b481c6b1da91013925 diff --git a/ginac/operators.cpp b/ginac/operators.cpp index 1a1b6de4..c5972c6c 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-2009 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 @@ -20,9 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include - #include "operators.h" #include "numeric.h" #include "add.h" @@ -33,6 +30,9 @@ #include "print.h" #include "utils.h" +#include +#include + namespace GiNaC { /** Used internally by operator+() to add two ex objects together. */ @@ -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);