Skip to content

Commit

Permalink
modifying qcdloop.pyx
Browse files Browse the repository at this point in the history
  • Loading branch information
DanieleLombardi committed May 19, 2021
1 parent 58fa38a commit 3f59ac5
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions pywrap/qcdloop.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,68 @@ cdef class QCDLoop:
out = [res[0], res[1], res[2]]
return out

cdef class TadPole:
cdef cpp.TadPole[double complex,double,double] *thisptr

def __cinit__(self):
self.thisptr = new cpp.TadPole[double complex,double,double]()

def __dealloc__(self):
del self.thisptr

def integral(self, mu2, m, p = []):
cdef vector[double complex] res
self.thisptr.integral(res,mu2,m,p)
out = [res[0], res[1], res[2]]
return out

def integral(self, mu2, m):
cdef vector[double complex] res
self.thisptr.integral(res,mu2,m,[])
out = [res[0], res[1], res[2]]
return out

cdef class Bubble:
cdef cpp.Bubble[double complex,double,double] *thisptr

def __cinit__(self):
self.thisptr = new cpp.Bubble[double complex,double,double]()

def __dealloc__(self):
del self.thisptr

def integral(self, mu2, m, p):
cdef vector[double complex] res
self.thisptr.integral(res,mu2,m,p)
out = [res[0], res[1], res[2]]
return out

cdef class Triangle:
cdef cpp.Triangle[double complex,double,double] *thisptr

def __cinit__(self):
self.thisptr = new cpp.Triangle[double complex,double,double]()

def __dealloc__(self):
del self.thisptr

def integral(self, mu2, m, p):
cdef vector[double complex] res
self.thisptr.integral(res,mu2,m,p)
out = [res[0], res[1], res[2]]
return out

cdef class Box:
cdef cpp.Box[double complex,double,double] *thisptr

def __cinit__(self):
self.thisptr = new cpp.Box[double complex,double,double]()

def __dealloc__(self):
del self.thisptr

def integral(self, mu2, m, p):
cdef vector[double complex] res
self.thisptr.integral(res,mu2,m,p)
out = [res[0], res[1], res[2]]
return out

0 comments on commit 3f59ac5

Please sign in to comment.