X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fadd.h;h=d4da3beabea7b7f786de1b12872c2d0eb60c2d88;hp=f471741b95464d5539283ae7158a498d31c8a76a;hb=c443cf647bbac14c9c3eed2565fd2df70fab9a84;hpb=9eab44408b9213d8909b7a9e525f404ad06064dd diff --git a/ginac/add.h b/ginac/add.h index f471741b..d4da3bea 100644 --- a/ginac/add.h +++ b/ginac/add.h @@ -3,7 +3,7 @@ * Interface to GiNaC's sums of expressions. */ /* - * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2000 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 @@ -25,11 +25,15 @@ #include +#ifndef NO_GINAC_NAMESPACE namespace GiNaC { +#endif // ndef NO_GINAC_NAMESPACE /** Sum of expressions. */ class add : public expairseq { + GINAC_DECLARE_REGISTERED_CLASS(add, expairseq) + friend class mul; friend class ncmul; friend class power; @@ -58,8 +62,8 @@ public: // functions overriding virtual functions from bases classes public: basic * duplicate() const; - void printraw(ostream & os) const; void print(ostream & os, unsigned upper_precedence=0) const; + void printraw(ostream & os) const; void printcsrc(ostream & os, unsigned type, unsigned upper_precedence=0) const; bool info(unsigned inf) const; int degree(symbol const & s) const; @@ -70,7 +74,7 @@ public: ex series(symbol const & s, ex const & point, int order) const; ex normal(lst &sym_lst, lst &repl_lst, int level=0) const; numeric integer_content(void) const; - ex smod(numeric const &xi) const; + ex smod(const numeric &xi) const; numeric max_coefficient(void) const; exvector get_indices(void) const; ex simplify_ncmul(exvector const & v) const; @@ -81,8 +85,6 @@ protected: unsigned return_type_tinfo(void) const; ex thisexpairseq(epvector const & v, ex const & oc) const; ex thisexpairseq(epvector * vp, ex const & oc) const; - void printpair(ostream & os, expair const & p, - unsigned upper_precedence) const; expair split_ex_to_pair(ex const & e) const; expair combine_ex_with_coeff_to_pair(ex const & e, ex const & c) const; @@ -114,6 +116,8 @@ inline const add &ex_to_add(const ex &e) return static_cast(*e.bp); } +#ifndef NO_GINAC_NAMESPACE } // namespace GiNaC +#endif // ndef NO_GINAC_NAMESPACE #endif // ndef __GINAC_ADD_H__