mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 15:55:37 +00:00
Fix compile
This commit is contained in:
parent
89f961faef
commit
e5d30fe5e2
@ -7,6 +7,26 @@ using namespace std;
|
|||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
using namespace Grid::QCD;
|
using namespace Grid::QCD;
|
||||||
|
|
||||||
|
|
||||||
|
/* For Metropolis */
|
||||||
|
class Metropolis {
|
||||||
|
public:
|
||||||
|
GridSerialRNG & sRNG;
|
||||||
|
Metropolis(GridSerialRNG & _sRNG) : sRNG(_sRNG) {};
|
||||||
|
bool AcceptReject(const RealD Delta)
|
||||||
|
{
|
||||||
|
RealD rand;
|
||||||
|
|
||||||
|
if(Delta <=0.0) return true;
|
||||||
|
|
||||||
|
random(sRNG,rand);
|
||||||
|
if(rand <= exp(-Delta))
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
int main (int argc, char ** argv)
|
int main (int argc, char ** argv)
|
||||||
{
|
{
|
||||||
Grid_init(&argc,&argv);
|
Grid_init(&argc,&argv);
|
||||||
|
Loading…
Reference in New Issue
Block a user