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

Class LorentzObjectRepresentation

source code

object --+    
         |    
      dict --+
             |
            LorentzObjectRepresentation
Known Subclasses:

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
a shallow copy of D
copy(self) 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
 
__mul__(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
 
combine_indices(self, l_dict, s_dict)
return the indices in the correct order following the dicts rules
source code
 
tensor_product(self, obj)
return the tensorial product of the object
source code
 
__div__(self, obj)
define division Only division by scalar!!!
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
 
__truediv__(self, obj)
define division Only division by scalar!!!
source code
 
__rtruediv__(self, obj)
define division Only division by scalar!!!
source code
 
__rdiv__(self, obj)
define division Only division by scalar!!!
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
 
listindices(self)
Return an iterator in order to be able to loop easily on all the indices of the object.
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
 
__eq__(self, obj)
Check that two representation are identical
source code
 
__str__(self)
string representation
source code

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

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

Static Methods [hide private]
 
pass_ind_in_dict(indices, key)
made a dictionary (pos -> index_value) for how call the object
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
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__

copy(self)

source code 
Returns: a shallow copy of D
Overrides: dict.copy
(inherited documentation)

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)

__eq__(self, obj)
(Equality operator)

source code 

Check that two representation are identical

Overrides: dict.__eq__

__str__(self)
(Informal representation operator)

source code 

string representation

Overrides: object.__str__