Package aloha :: Module aloha_lib :: Class LorentzObjectRepresentation
[hide private]
[frames] | no frames]

Class LorentzObjectRepresentation

source code

object --+    
         |    
      dict --+
             |
            LorentzObjectRepresentation

A concrete representation of the LorentzObject.

Nested Classes [hide private]
  LorentzObjectRepresentationError
Specify error for LorentzObjectRepresentation
Instance Methods [hide private]
new empty dictionary

__init__(self, representation, lorentz_indices, spin_indices)
initialize the lorentz object representation
source code
 
__str__(self)
string representation
source code
 
get_rep(self, indices)
return the value/Variable associate to the indices
source code
 
set_rep(self, indices, value)
assign 'value' at the indices position
source code
 
listindices(self)
Return an iterator in order to be able to loop easily on all the indices of the object.
source code
 
__add__(self, obj, fact=1) source code
 
__iadd__(self, obj, fact=1) source code
 
__sub__(self, obj) source code
 
__rsub__(self, obj) source code
 
__isub__(self, obj) source code
 
__neg__(self) source code
 
__mul__(self, obj)
multiplication performing directly the einstein/spin sommation.
source code
 
__rmul__(self, obj)
multiplication performing directly the einstein/spin sommation.
source code
 
__imul__(self, obj)
multiplication performing directly the einstein/spin sommation.
source code
 
contraction(self, obj, l_sum, s_sum, l_dict, s_dict)
make the Lorentz/spin contraction of object self and obj.
source code
 
tensor_product(self, obj)
return the tensorial product of the object
source code
 
factorize(self)
Try to factorize each component
source code
 
simplify(self)
Check if we can simplify the object (check for non treated Sum)
source code
 
combine_indices(self, l_dict, s_dict)
return the indices in the correct order following the dicts rules
source code
 
split(self, variables_id)
return a dict with the key being the power associated to each variables and the value being the object remaining after the suppression of all the variable
source code

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, __sizeof__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values, viewitems, viewkeys, viewvalues

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

Static Methods [hide private]
 
get_mapping(l1, l2, switch_order=[]) source code
 
compare_indices(list1, list2)
return two list, the first one contains the position of non summed index and the second one the position of summed index.
source code
 
pass_ind_in_dict(indices, key)
made a dictionary (pos -> index_value) for how call the object
source code
Class Variables [hide private]
  vartype = 4

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, representation, lorentz_indices, spin_indices)
(Constructor)

source code 

initialize the lorentz object representation

Returns:
new empty dictionary

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

string representation

Overrides: object.__str__

contraction(self, obj, l_sum, s_sum, l_dict, s_dict)

source code 

make the Lorentz/spin contraction of object self and obj. l_sum/s_sum are the position of the sum indices l_dict/s_dict are dict given the value of the fix indices (indices->value)