X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fexpair.cpp;h=6070ffb51b6da964a05594132a7286cbedfbc94a;hp=61d8e26f90f9709fa1a5d3942bd28361d16891f4;hb=8dc09f48182574d792a2ed7c37b66831d9267a6c;hpb=fbdd5eefb7188778ca9c04b5bee08223609b880f diff --git a/ginac/expair.cpp b/ginac/expair.cpp index 61d8e26f..6070ffb5 100644 --- a/ginac/expair.cpp +++ b/ginac/expair.cpp @@ -3,7 +3,7 @@ * Implementation of expression pairs (building blocks of expairseq). */ /* - * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2004 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 @@ -23,6 +23,7 @@ #include #include "expair.h" +#include "operators.h" namespace GiNaC { @@ -34,4 +35,14 @@ void expair::print(std::ostream & os) const coeff.print(c, c.delta_indent); } +const expair expair::conjugate() const +{ + ex newrest = rest.conjugate(); + ex newcoeff = coeff.conjugate(); + if (are_ex_trivially_equal(newrest,rest) && are_ex_trivially_equal(newcoeff,coeff)) { + return *this; + } + return expair(newrest, newcoeff); +} + } // namespace GiNaC