X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fncmul.h;h=5c56e14cb460ad35a29ed75bff91bb06236e6a00;hb=286b0d93528e35957a50c51343e0b4a9bc623bce;hp=65faed2e4e534f06d5eb275056a8cde562c8d41f;hpb=da64e515abf7243bc4c84ca3631470931c4e6691;p=ginac.git diff --git a/ginac/ncmul.h b/ginac/ncmul.h index 65faed2e..5c56e14c 100644 --- a/ginac/ncmul.h +++ b/ginac/ncmul.h @@ -3,7 +3,7 @@ * Interface to GiNaC's non-commutative products of expressions. */ /* - * GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2011 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,10 +20,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __GINAC_NCMUL_H__ -#define __GINAC_NCMUL_H__ +#ifndef GINAC_NCMUL_H +#define GINAC_NCMUL_H #include "exprseq.h" +#include "archive.h" namespace GiNaC { @@ -65,11 +66,13 @@ public: ex thiscontainer(const exvector & v) const; ex thiscontainer(std::auto_ptr vp) const; ex conjugate() const; + ex real_part() const; + ex imag_part() const; protected: ex derivative(const symbol & s) const; unsigned return_type() const; - unsigned return_type_tinfo() const; + return_type_t return_type_tinfo() const; // new virtual functions which can be overridden by derived classes // none @@ -84,20 +87,13 @@ protected: public: const exvector & get_factors() const; }; +GINAC_DECLARE_UNARCHIVER(ncmul); // friend funtions ex reeval_ncmul(const exvector & v); ex hold_ncmul(const exvector & v); -// utility functions - -/** Specialization of is_exactly_a(obj) for ncmul objects. */ -template<> inline bool is_exactly_a(const basic & obj) -{ - return obj.tinfo()==TINFO_ncmul; -} - } // namespace GiNaC -#endif // ndef __GINAC_NCMUL_H__ +#endif // ndef GINAC_NCMUL_H