This is the internal Cpp function used to run the metropolis hasting algorithm if use.cpp = T. In general, it shouldn't be used as a stand alone function, because some preprocessing is done in R
matrix of data - must be numeric (factors are converted to numeric in R)
cost vector (0 if no cost)
matrix of continuous strata
matrix of included data
integer vector of rows from which sampling is allowed
boolean factor flag
indices of factors in xA
number of samples
bool cost flag
number of iterations
continuous weight
factor weights
correlation weights
eta matrix - either all 1, or user input
initial temperature
temperature decrease every length_cycle iterations
number of iterations between temperature decrease
list with sampled data, indices, objective values, cost value, and final continuous weights for each sample