Package madgraph :: Package madweight :: Module MW_fct :: Class Multi_list
[hide private]
[frames] | no frames]

Class Multi_list

source code

object --+    
         |    
      list --+
             |
            Multi_list

a list of list

Instance Methods [hide private]
 
give_combinaison(self)
return all the combinatory possibility in a list
source code
 
extract_vector(self, pos_list)
return the list of element corresponding at position in pos_list
source code
 
give_list_possiblity(self, list, opt='')
return all permutation of list where each element belongs to corresponding list of the multilist
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__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from list: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

give_list_possiblity(self, list, opt='')

source code 
return all permutation of list where each element belongs to corresponding list of the multilist

example: multilist=[ [a,b,c],[a,b,d],[c,d] ]
         list=[a,b,c]
            ->return=[ [a,b,c],[b,a,c] ]
            
         multilist=[ [a,b,c],[a,b,d],[a,c,d] ]   
         list=[a,b,d]
            ->return=[ [a,b,d],[b,a,d],[b,d,a] ]

option: if the list is made of object, but multilist are data of this object,
        you can use opt to check if list[i].opt in self[i]