X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Findexed.h;h=cc604f1378f43654bbd6ae86acaeb5ce86548abf;hb=19d82770007e4d565ce4d07e3e7a02a1809de4eb;hp=32b081ac07327aba9185e004082b0ded877f3417;hpb=383d5eb3b0f0506810d9105a268f939125bfc347;p=ginac.git diff --git a/ginac/indexed.h b/ginac/indexed.h index 32b081ac..cc604f13 100644 --- a/ginac/indexed.h +++ b/ginac/indexed.h @@ -30,23 +30,12 @@ namespace GiNaC { #endif // ndef NO_NAMESPACE_GINAC -/** Base class for non-commutative indexed objects */ + +/** Base class for objects with indices. */ class indexed : public exprseq { GINAC_DECLARE_REGISTERED_CLASS(indexed, exprseq) -// member functions - - // default constructor, destructor, copy constructor assignment operator and helpers -public: - indexed(); - ~indexed(); - indexed(const indexed & other); - const indexed & operator=(const indexed & other); -protected: - void copy(const indexed & other); - void destroy(bool call_parent); - // other constructors public: indexed(const ex & i1); @@ -58,16 +47,17 @@ public: // functions overriding virtual functions from base classes public: - basic * duplicate() const; void printraw(std::ostream & os) const; void printtree(std::ostream & os, unsigned indent) const; void print(std::ostream & os, unsigned upper_precedence=0) const; void printcsrc(std::ostream & os, unsigned type, unsigned upper_precedence) const; bool info(unsigned inf) const; - exvector get_indices(void) const; + + /** Return the vector of indices on this object. */ + exvector get_indices(void) const {return seq;} + protected: ex derivative(const symbol & s) const; - int compare_same_type(const basic & other) const; bool is_equal_same_type(const basic & other) const; unsigned return_type(void) const; unsigned return_type_tinfo(void) const; @@ -88,11 +78,6 @@ protected: // none }; -// global constants - -extern const indexed some_indexed; -extern const std::type_info & typeid_indexed; - // utility functions inline const indexed &ex_to_indexed(const ex &e) {