Package madgraph :: Package various :: Module q_polynomial :: Class FromGolem95FortranCodeGenerator
[hide private]
[frames] | no frames]

Class FromGolem95FortranCodeGenerator

source code

Just a container class with helper functions taken from the script tens.py of golem which generates most of the golem95 tens_rec.f fortran code.

Class Methods [hide private]
 
combinat(cls, n, k)
Calculates the binomial coefficient (n atop k).
source code
 
generate_mapping(cls, R, k)
Generates a mapping from tensor components \hat{C}(a_1, ..., a_k) into a one dimensional array.
source code
 
generate_equations(cls, R, k)
Generates a set of equations for a given number of non-zero components and fixed maximum rank.
source code
 
select(cls, items, k)
Iterator over all selections of k elements from a given list.
source code
Class Variables [hide private]
  PRIMES = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, ...
Method Details [hide private]

generate_mapping(cls, R, k)
Class Method

source code 

Generates a mapping from tensor components \hat{C}(a_1, ..., a_k) into a one dimensional array.

PARAMETER

R -- rank k -- number of non-zero components of q

RETURN

(lst, dic)

lst -- list of (a_1, ..., a_k) dic -- mapping from (a_1, ..., a_k) -> int

lst[dic[X]] = X if X in dic

generate_equations(cls, R, k)
Class Method

source code 

Generates a set of equations for a given number of non-zero components and fixed maximum rank.

PARAMETER

R -- rank k -- number of non-zero components of q

RETURN

(LHS, RHS)

LHS -- a matrix (i.e. list of lists) of coefficients RHS -- a list of values of q

select(cls, items, k)
Class Method

source code 

Iterator over all selections of k elements from a given list.

PARAMETER

items -- list of elements to choose from (no repetitions) k -- number of elements to select.


Class Variable Details [hide private]

PRIMES

Value:
[2,
 3,
 5,
 7,
 11,
 13,
 17,
 19,
...