X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Findexed.h;h=cba48c88d9d6440ee192300e874a62eae18d6195;hp=b15ed8b30ec892975e322178fb6f32da7f0b222a;hb=a23befbfe262832c398f4742eb54f8b19fe9f2d0;hpb=094911eb78cacb6f2877a70c9ac74766df58ccea diff --git a/ginac/indexed.h b/ginac/indexed.h index b15ed8b3..cba48c88 100644 --- a/ginac/indexed.h +++ b/ginac/indexed.h @@ -151,11 +151,12 @@ public: // functions overriding virtual functions from base classes public: - 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 print(const print_context & c, unsigned level = 0) const; 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: @@ -173,11 +174,19 @@ public: * @see class info_flags */ bool all_index_values_are(unsigned inf) const; + /** Return a vector containing the object's indices. */ + exvector get_indices(void) const; + + /** Return a vector containing the dummy indices of the object, if any. */ + exvector get_dummy_indices(void) const; + + /** Return a vector containing the dummy indices in the contraction with + * another indexed object. */ + exvector get_dummy_indices(const indexed & other) const; + protected: - void printrawindices(std::ostream & os) const; - void printtreeindices(std::ostream & os, unsigned indent) const; - void printindices(std::ostream & os) const; - bool all_indices_of_type_idx(void) const; + void printindices(const print_context & c, unsigned level) const; + void assert_all_indices_of_type_idx(void) const; // member variables protected: