1#ifndef KENNEDY_PENDLETON_H
2#define KENNEDY_PENDLETON_H
4#include "plumbing/hila.h"
5#include "datatypes/su2.h"
36 const T xi = ::sqrt(det(staple));
37 const SU2<T> V = staple / xi;
45 const int LOOPLIM = 100;
46 const double pi2 = M_PI * 2.0;
47 double r1, r2, r3, delta;
55 delta = (r1*r3 + r2) / alpha;
59 }
while (nloops < LOOPLIM && r3*r3 > 1.0 - 0.5*delta);
62 if (nloops >= LOOPLIM) {
83 a.c = ::sqrt(rd) * r3;
85 rd = ::sqrt(rd * (1.0 -
::sqr(r3)));
86 a.b = rd * ::cos(theta);
87 a.a = rd * ::sin(theta);
constexpr T sqr(const T &arg)
Define convenience function sqr(), returning square of argument.
double random()
Real valued uniform random number generator.