X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Findexed.h;h=ad18ddb55f91c568e1b09f727a4f8b814ff59329;hp=df05429e3eaa87a539c045c8e430c31939f6807d;hb=34704348ad3e512010cbf85b6a9dee9fff22cd66;hpb=0cf43f3096cbcfc7472ff9c8927c6eb74f2eeb8c diff --git a/ginac/indexed.h b/ginac/indexed.h index df05429e..ad18ddb5 100644 --- a/ginac/indexed.h +++ b/ginac/indexed.h @@ -3,7 +3,7 @@ * Interface to GiNaC's indexed expressions. */ /* - * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2002 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 @@ -42,6 +42,7 @@ class indexed : public exprseq friend ex simplify_indexed(const ex & e, exvector & free_indices, exvector & dummy_indices, const scalar_products & sp); friend ex simplify_indexed_product(const ex & e, exvector & free_indices, exvector & dummy_indices, const scalar_products & sp); + friend bool reposition_dummy_indices(ex & e, exvector & variant_dummy_indices, exvector & moved_indices); // other constructors public: @@ -143,14 +144,13 @@ public: // functions overriding virtual functions from base classes public: void print(const print_context & c, unsigned level = 0) const; + unsigned precedence(void) const {return 55;} bool info(unsigned inf) const; ex eval(int level = 0) const; - int degree(const ex & s) const; - int ldegree(const ex & s) const; - ex coeff(const ex & s, int n = 1) const; exvector get_free_indices(void) const; protected: + ex derivative(const symbol & s) const; ex thisexprseq(const exvector & v) const; ex thisexprseq(exvector * vp) const; unsigned return_type(void) const { return return_types::commutative; } @@ -234,13 +234,6 @@ private: // utility functions -/** Return the indexed object handled by an ex. - * This is unsafe: you need to check the type first. */ -inline const indexed &ex_to_indexed(const ex &e) -{ - return static_cast(*e.bp); -} - /** Specialization of is_exactly_a(obj) for indexed objects. */ template<> inline bool is_exactly_a(const basic & obj) {