require(inline)
source("helper.R")
source("corrMH.R")

set.seed(66)

for(i in 1:30) print(corrMH(0.2, 0.5, 100, 0))

corrMH.Rcpp <- cxxfunction(
 signature(a="numeric", b="numeric", N="numeric", x="numeric"), 
 body=cat.file("corrMH.Rcpp.cpp"), plugin="Rcpp")

set.seed(66)

for(i in 1:30) print(corrMH.Rcpp(0.2, 0.5, 100, 0))
