Package madgraph :: Package core :: Module color_algebra :: Class ColorObject
[hide private]
[frames] | no frames]

Class ColorObject

source code

 object --+    
          |    
array.array --+
              |
             ColorObject
Known Subclasses:

Parent class for all color objects like T, Tr, f, d, ... Any new color object MUST inherit from this class!

Instance Methods [hide private]
 
__reduce__(self)
Special method needed to pickle color objects correctly
source code
 
__str__(self)
Returns a standard string representation.
source code
 
__repr__(self)
Returns a standard string representation.
source code
 
simplify(self)
Simplification rules, to be overwritten for each new color object! Should return a color factor or None if no simplification is possible
source code
 
pair_simplify(self, other)
Pair simplification rules, to be overwritten for each new color object! Should return a color factor or None if no simplification is possible
source code
 
complex_conjugate(self)
Complex conjugation.
source code
 
replace_indices(self, repl_dict)
Replace current indices following the rules listed in the replacement dictionary written as {old_index:new_index,...
source code
 
create_copy(self)
Return a real copy of the current object.
source code
 
__copy__(self)
Return a real copy of the current object.
source code

Inherited from array.array: __add__, __contains__, __deepcopy__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __rmul__, __setitem__, __setslice__, append, buffer_info, byteswap, count, extend, fromfile, fromlist, fromstring, fromunicode, index, insert, pop, read, remove, reverse, tofile, tolist, tostring, tounicode, write

Inherited from object: __delattr__, __format__, __hash__, __init__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(cls, *args)
Create a new ColorObject, assuming an integer array
source code
Properties [hide private]

Inherited from array.array: itemsize, typecode

Inherited from object: __class__

Method Details [hide private]

__new__(cls, *args)
Static Method

source code 

Create a new ColorObject, assuming an integer array

Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__reduce__(self)

source code 

Special method needed to pickle color objects correctly

Overrides: object.__reduce__

__str__(self)
(Informal representation operator)

source code 

Returns a standard string representation.

Overrides: object.__str__

__repr__(self)
(Representation operator)

source code 

Returns a standard string representation.

Overrides: object.__repr__

complex_conjugate(self)

source code 

Complex conjugation. By default, the ordering of color index is reversed. Can be overwritten for specific color objects like T,...

replace_indices(self, repl_dict)

source code 

Replace current indices following the rules listed in the replacement dictionary written as {old_index:new_index,...}. Deals correctly with the replacement by allowing only one single replacement.

__copy__(self)

source code 

Return a real copy of the current object.

Overrides: array.array.__copy__