Description Usage Arguments Details Value
Generate feasible states by constantly adding random noises to supplied (non-feasible) states.
1 2 |
theta |
a matrix with each column corresponding to an (unfeasible) state. (num mat) |
indicator |
an indicator function that takes a matrix and return a boolean vector, each element of which corresponds to a column of the input matrix, indicating its feasibility . (num mat -> bool vec) |
N |
the number of feasible states. |
dist |
the distribution of the random noise. This must be a sampler such as rnorm, rcauchy and rt. (function) |
dist.para |
a list of parameters used in |
This is a rejection sampler that repeatedly adds noises to theta
feasible states are attained (i.e. when indicator
returns 1). If
N < ncol(theta)
, N states will be randomly sampled from theta
,
whereas if N > ncol(theta)
, additional states will be sampled from
theta
to make up the number.
This function will terminate after 10000 of failed trials.
a list consisting of a matrix of transitioned states, a vector of objective function values corresponding to the transitioned states, and the acceptance proportion (useful for diagnostic purpose).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.