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

Class ColorFactor

source code

object --+    
         |    
      list --+
             |
            ColorFactor

ColorFactor objects are list of ColorString with an implicit summation. They can be simplified by simplifying all their elements.

Instance Methods [hide private]
 
__str__(self)
Returns a nice string for print
source code
 
append_str(self, new_str)
Special append taking care of adding new string to strings already existing with the same structure.
source code
 
extend_str(self, new_col_fact)
Special extend taking care of adding new strings to strings already existing with the same structure.
source code
 
simplify(self)
Returns a new color factor where each color string has been simplified once and similar strings have been added.
source code
 
full_simplify(self)
Simplify the current color factor until the result is stable
source code
 
set_Nc(self, Nc=3)
Returns a tuple containing real and imaginary parts of the current color factor, when Nc is replaced (3 by default).
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)
Returns a real copy of self, non trivial because bug in copy.deepcopy
source code
 
__copy__(self)
Returns a real copy of self, non trivial because bug in copy.deepcopy
source code

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __init__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, append, count, extend, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Class Variables [hide private]

Inherited from list: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__str__(self)
(Informal representation operator)

source code 

Returns a nice string for print

Overrides: object.__str__

replace_indices(self, repl_dict)

source code 

Replace current indices following the rules listed in the replacement dictionary written as {old_index:new_index,...}, does that for ALL color strings.