X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fcolor.h;h=448a81edcd7b30bfeb8aed37b0cb2f7fdba419a8;hp=d595cb3e374b285d5b6804b6b4f6100bd21c7308;hb=81a315ac1de10724ad963e2a167b7f618b81ac0f;hpb=d327f3f00c66a79d42855939866047b3e8caa630 diff --git a/ginac/color.h b/ginac/color.h index d595cb3e..448a81ed 100644 --- a/ginac/color.h +++ b/ginac/color.h @@ -3,7 +3,7 @@ * Interface to GiNaC's color (SU(3) Lie algebra) objects. */ /* - * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2015 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 @@ -20,8 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __GINAC_COLOR_H__ -#define __GINAC_COLOR_H__ +#ifndef GINAC_COLOR_H +#define GINAC_COLOR_H #include "indexed.h" #include "tensor.h" @@ -30,7 +30,6 @@ namespace GiNaC { - /** This class holds a generator T_a or the unity element of the Lie algebra * of SU(3), as used for calculations in quantum chromodynamics. A * representation label (an unsigned 8-bit integer) is used to distinguish @@ -47,19 +46,19 @@ public: color(const ex & b, const ex & i1, unsigned char rl = 0); // internal constructors - color(unsigned char rl, const exvector & v, bool discardable = false); - color(unsigned char rl, std::auto_ptr vp); - void archive(archive_node& n) const; - void read_archive(const archive_node& n, lst& sym_lst); + color(unsigned char rl, const exvector & v); + color(unsigned char rl, exvector && v); + void archive(archive_node& n) const override; + void read_archive(const archive_node& n, lst& sym_lst) override; // functions overriding virtual functions from base classes protected: - ex eval_ncmul(const exvector & v) const; - bool match_same_type(const basic & other) const; - ex thiscontainer(const exvector & v) const; - ex thiscontainer(std::auto_ptr vp) const; - unsigned return_type() const { return return_types::noncommutative; } - return_type_t return_type_tinfo() const; + ex eval_ncmul(const exvector & v) const override; + bool match_same_type(const basic & other) const override; + ex thiscontainer(const exvector & v) const override; + ex thiscontainer(exvector && v) const override; + unsigned return_type() const override { return return_types::noncommutative; } + return_type_t return_type_tinfo() const override; // non-virtual functions in this class public: @@ -91,7 +90,7 @@ class su3t : public tensor // functions overriding virtual functions from base classes public: - bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const; + bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const override; // non-virtual functions in this class protected: @@ -108,12 +107,13 @@ class su3f : public tensor // functions overriding virtual functions from base classes public: - ex eval_indexed(const basic & i) const; - bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const; + ex eval_indexed(const basic & i) const override; + bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const override; +protected: + unsigned return_type() const override { return return_types::commutative; } // non-virtual functions in this class protected: - unsigned return_type() const { return return_types::commutative; } void do_print(const print_context & c, unsigned level) const; void do_print_latex(const print_latex & c, unsigned level) const; }; @@ -126,12 +126,13 @@ class su3d : public tensor // functions overriding virtual functions from base classes public: - ex eval_indexed(const basic & i) const; - bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const; + ex eval_indexed(const basic & i) const override; + bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const override; +protected: + unsigned return_type() const override { return return_types::commutative; } // non-virtual functions in this class protected: - unsigned return_type() const { return return_types::commutative; } void do_print(const print_context & c, unsigned level) const; void do_print_latex(const print_latex & c, unsigned level) const; }; @@ -192,7 +193,6 @@ ex color_trace(const ex & e, const lst & rll); * @param rl Representation label */ ex color_trace(const ex & e, unsigned char rl = 0); - } // namespace GiNaC -#endif // ndef __GINAC_COLOR_H__ +#endif // ndef GINAC_COLOR_H