GiNaC  1.6.2
Public Member Functions | Protected Member Functions | Private Attributes
GiNaC::color Class Reference

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. More...

#include <color.h>

Inheritance diagram for GiNaC::color:
GiNaC::indexed GiNaC::container< C > GiNaC::basic GiNaC::container_storage< C > GiNaC::refcounted

List of all members.

Public Member Functions

 color (const ex &b, unsigned char rl=0)
 Construct object without any color index.
 color (const ex &b, const ex &i1, unsigned char rl=0)
 Construct object with one color index.
 color (unsigned char rl, const exvector &v, bool discardable=false)
 color (unsigned char rl, std::auto_ptr< exvector > vp)
void archive (archive_node &n) const
 Save (a.k.a.
void read_archive (const archive_node &n, lst &sym_lst)
 Read (a.k.a.
unsigned char get_representation_label () const

Protected Member Functions

ex eval_ncmul (const exvector &v) const
 Perform automatic simplification on noncommutative product of color objects.
bool match_same_type (const basic &other) const
 Returns true if the attributes of two objects are similar enough for a match.
ex thiscontainer (const exvector &v) const
ex thiscontainer (std::auto_ptr< exvector > vp) const
unsigned return_type () const
return_type_t return_type_tinfo () const

Private Attributes

unsigned char representation_label
 Representation label to distinguish independent color matrices coming from separated fermion lines.

Detailed Description

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 elements from different Lie algebras (objects with different labels commutate). These objects implement an abstract representation of the group, not a specific matrix representation. The indices used for color objects should not have a variance.

Definition at line 40 of file color.h.


Constructor & Destructor Documentation

GiNaC::color::color ( const ex b,
unsigned char  rl = 0 
)

Construct object without any color index.

This constructor is for internal use only. Use the color_ONE() function instead.

See also:
color_ONE

Definition at line 78 of file color.cpp.

GiNaC::color::color ( const ex b,
const ex i1,
unsigned char  rl = 0 
)

Construct object with one color index.

This constructor is for internal use only. Use the color_T() function instead.

See also:
color_T

Definition at line 85 of file color.cpp.

GiNaC::color::color ( unsigned char  rl,
const exvector v,
bool  discardable = false 
)

Definition at line 89 of file color.cpp.

GiNaC::color::color ( unsigned char  rl,
std::auto_ptr< exvector vp 
)

Definition at line 93 of file color.cpp.


Member Function Documentation

void GiNaC::color::archive ( archive_node n) const [virtual]

Save (a.k.a.

serialize) indexed object into archive.

Reimplemented from GiNaC::indexed.

Definition at line 114 of file color.cpp.

References GiNaC::archive_node::add_unsigned(), and representation_label.

void GiNaC::color::read_archive ( const archive_node n,
lst syms 
) [virtual]

Read (a.k.a.

deserialize) indexed object from archive.

Reimplemented from GiNaC::indexed.

Definition at line 106 of file color.cpp.

References GiNaC::archive_node::find_unsigned(), and representation_label.

ex GiNaC::color::eval_ncmul ( const exvector v) const [protected, virtual]

Perform automatic simplification on noncommutative product of color objects.

This removes superfluous ONEs.

Reimplemented from GiNaC::basic.

Definition at line 163 of file color.cpp.

bool GiNaC::color::match_same_type ( const basic other) const [protected, virtual]

Returns true if the attributes of two objects are similar enough for a match.

This function must not match subexpressions (this is already done by basic::match()). Only attributes not accessible by op() should be compared. This is also the reason why this function doesn't take the wildcard replacement list from match() as an argument: only subexpressions are subject to wildcard matches. Also, this function only needs to be implemented for container classes because is_equal_same_type() is automatically used instead of match_same_type() if nops() == 0.

See also:
basic::match

Reimplemented from GiNaC::basic.

Definition at line 143 of file color.cpp.

References GINAC_ASSERT, and representation_label.

ex GiNaC::color::thiscontainer ( const exvector v) const [protected]

Reimplemented from GiNaC::indexed.

Definition at line 182 of file color.cpp.

ex GiNaC::color::thiscontainer ( std::auto_ptr< exvector vp) const [protected]

Reimplemented from GiNaC::indexed.

Definition at line 187 of file color.cpp.

unsigned GiNaC::color::return_type ( ) const [inline, protected, virtual]

Reimplemented from GiNaC::indexed.

Definition at line 60 of file color.h.

References GiNaC::return_types::noncommutative.

return_type_t GiNaC::color::return_type_tinfo ( ) const [protected, virtual]

Reimplemented from GiNaC::indexed.

Definition at line 97 of file color.cpp.

References representation_label.

unsigned char GiNaC::color::get_representation_label ( ) const [inline]

Definition at line 65 of file color.h.

References representation_label.


Member Data Documentation

unsigned char GiNaC::color::representation_label [private]

Representation label to distinguish independent color matrices coming from separated fermion lines.

Definition at line 69 of file color.h.

Referenced by archive(), get_representation_label(), match_same_type(), read_archive(), and return_type_tinfo().


The documentation for this class was generated from the following files:

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.