]> www.ginac.de Git - ginac.git/blobdiff - ginac/color.h
- dirac_trace() takes an optional third argument: the expression to use for
[ginac.git] / ginac / color.h
index 04d7c5d9e88c106869d37c2e025c3b1fe5e7faa9..eb273c71b7da3ec710d5423a3bd2e3fb553a8f0f 100644 (file)
@@ -57,6 +57,10 @@ protected:
        unsigned return_type(void) const { return return_types::noncommutative; }
        unsigned return_type_tinfo(void) const { return TINFO_color + representation_label; }
 
+       // non-virtual functions in this class
+public:
+       unsigned char get_representation_label(void) const {return representation_label;}
+
        // member variables
 private:
        unsigned char representation_label; /**< Representation label to distinguish independent color matrices coming from separated fermion lines */
@@ -81,6 +85,7 @@ class su3t : public tensor
        // functions overriding virtual functions from bases classes
 public:
        void print(const print_context & c, unsigned level = 0) const;
+       bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const;
 };
 
 /** This class represents the tensor of antisymmetric su(3) structure
@@ -149,6 +154,13 @@ ex color_d(const ex & a, const ex & b, const ex & c);
 /** This returns the linear combination d.a.b.c+I*f.a.b.c. */
 ex color_h(const ex & a, const ex & b, const ex & c);
 
+/** Calculate the trace of an expression containing color objects with a
+ *  specified representation label.
+ *
+ *  @param e Expression to take the trace of
+ *  @param rl Representation label */
+ex color_trace(const ex & e, unsigned char rl = 0);
+
 
 } // namespace GiNaC