Conditional probability for a random walk inside a hypercube. More...
#include <prob_dens_func.h>
This conditional probability is most useful in providing a Metropolis-Hastings distribution with a fixed step size which properly handles a boundary. The Metropolis-Hastings step is accepted if obeys
The function , and because of the fixed step size these probabilities are just proportional to the inverse allowed volume, i.e.
. If
is near a boundary then
is decreased and the conditional probability increases accordingly. If the distance between
and
is unreachable in a step, then the PDF is zero.
Definition at line 1566 of file prob_dens_func.h.
Public Member Functions | |
prob_cond_mdim_fixed_step (const prob_cond_mdim_fixed_step &pcmfs) | |
Copy constructor. | |
prob_cond_mdim_fixed_step & | operator= (const prob_cond_mdim_fixed_step &pcmfs) |
Copy constructor with operator=. | |
void | set_seed (unsigned long int s) |
Set the random number generator seed. | |
template<class = vec_t> | |
prob_cond_mdim_fixed_step (vec_t &step, vec_t &low, vec_t &high) | |
Create a conditional probability object with specified step sizes and limits. | |
virtual int | set (vec_t &step, vec_t &low, vec_t &high) |
Set step sizes and limits. | |
virtual size_t | dim () const |
The dimensionality. | |
virtual double | pdf (const vec_t &x_B, const vec_t &x_A) const |
The conditional probability of x_A given x_B, i.e. ![]() | |
virtual double | log_pdf (const vec_t &x_B, const vec_t &x_A) const |
The log of the conditional probability of x_A given x_B i.e. ![]() | |
virtual void | operator() (const vec_t &x_B, vec_t &x_A) const |
Sample the distribution. | |
![]() | |
virtual double | log_metrop_hast (const vec_t &x, vec_t &x_prime) const |
Sample the distribution and return the log of the Metropolis-Hastings ratio. More... | |
Protected Member Functions | |
int | set_internal (size_t sz, vec_t &step, vec_t &low, vec_t &high) |
Internal set function. More... | |
Protected Attributes | |
std::vector< double > | u_step |
Step sizes. | |
std::vector< double > | u_low |
Lower limits. | |
std::vector< double > | u_high |
Upper limits. | |
rng_gsl | rg |
Internal random number generator. | |
|
inlineprotected |
Definition at line 1593 of file prob_dens_func.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).