3 * Interface to GiNaC's lorentz indices. */
13 class lorentzidx : public idx
15 friend class simp_lor;
16 friend class scalar_products;
20 // default constructor, destructor, copy constructor assignment operator and helpers
24 lorentzidx (lorentzidx const & other);
25 lorentzidx const & operator=(lorentzidx const & other);
27 void copy(lorentzidx const & other);
28 void destroy(bool call_parent);
32 explicit lorentzidx(bool cov, bool oonly=false, unsigned dimp=0);
33 explicit lorentzidx(string const & n, bool cov=false,
34 bool oonly=false, unsigned dimp=0);
35 explicit lorentzidx(char const * n, bool cov=false,
36 bool oonly=false, unsigned dimp=0);
37 explicit lorentzidx(unsigned const v, bool cov=false);
39 // functions overriding virtual functions from bases classes
41 basic * duplicate() const;
42 void printraw(ostream & os) const;
43 void printtree(ostream & os, unsigned indent) const;
44 void print(ostream & os, unsigned upper_precedence=0) const;
45 bool info(unsigned inf) const;
47 // new virtual functions which can be overridden by derived classes
50 // non-virtual functions in this class
52 bool is_orthogonal_only(void) const { return orthogonal_only; }
53 unsigned get_dim_parallel_space(void) const { return dim_parallel_space; }
54 lorentzidx create_anonymous_representative(void) const;
59 unsigned dim_parallel_space;
64 extern const lorentzidx some_lorentzidx;
65 extern type_info const & typeid_lorentzidx;
69 #define ex_to_lorentzidx(X) (static_cast<lorentzidx const &>(*(X).bp))
71 #endif // ndef _LORENTZIDX_H_