Displaying 1 result from an estimated 1 matches for "q_gibbs_rand".
2002 Jan 14
1
trouble using R Mathlib as standalone
...Sincerely, Faheem Mitha.
************************************************************************
#include "lattice.hh"
#include "mh.hh"
#define MATHLIB_STANDALONE
#include <Rmath.h>
/* random sample from proposal distribution q-gibbs */
double q_gibbs_rand(Cube& cube, double& beta, vector<double>::size_type&
t)
{
vector<double> ctr = ((0.5)*(cube.down + cube.up)).coord;
vector<double>::size_type hsize = ctr.size();
double a, u, y;
if(t == 0)
a = beta*ctr[t+1];
else if(t == hsize - 1)
a = beta*ctr[t-1];...