GiNaC  1.6.2
expair.cpp
Go to the documentation of this file.
00001 
00005 /*
00006  *  GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany
00007  *
00008  *  This program is free software; you can redistribute it and/or modify
00009  *  it under the terms of the GNU General Public License as published by
00010  *  the Free Software Foundation; either version 2 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  This program is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  *  GNU General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU General Public License
00019  *  along with this program; if not, write to the Free Software
00020  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00021  */
00022 
00023 #include "expair.h"
00024 #include "operators.h"
00025 
00026 #include <iostream>
00027 
00028 namespace GiNaC {
00029 
00030 void expair::print(std::ostream & os) const
00031 {
00032     os << "expair:";
00033     print_tree c(os);
00034     rest.print(c, c.delta_indent);
00035     coeff.print(c, c.delta_indent);
00036 }
00037 
00038 const expair expair::conjugate() const
00039 {
00040     ex newrest = rest.conjugate();
00041     ex newcoeff = coeff.conjugate();
00042     if (are_ex_trivially_equal(newrest,rest) && are_ex_trivially_equal(newcoeff,coeff)) {
00043         return *this;
00044     }
00045     return expair(newrest, newcoeff);
00046 }
00047 
00048 } // namespace GiNaC

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.