APEMoST
|
#include "parallel_tempering_interaction.h"
#include "parallel_tempering.h"
#include "debug.h"
#include "mcmc_internal.h"
#include "gsl_helper.h"
Functions | |
int | parallel_tempering_decide_swap_random (mcmc **chains, int n_beta, int n_swap) |
int | parallel_tempering_decide_swap_nonrandom (mcmc **chains, int n_beta, int n_swap, int iter) |
int | parallel_tempering_decide_swap_now (mcmc **chains, int n_beta) |
void | tempering_interaction (mcmc **chains, unsigned int n_beta, unsigned long iter) |
int parallel_tempering_decide_swap_nonrandom | ( | mcmc ** | chains, |
int | n_beta, | ||
int | n_swap, | ||
int | iter | ||
) |
chooses one chain after another to swap. Swaps occur every n_swap.
References assert.
int parallel_tempering_decide_swap_now | ( | mcmc ** | chains, |
int | n_beta | ||
) |
chooses one chain to swap by random. Swap occurs every time.
References assert, and get_next_uniform_random().
Referenced by tempering_interaction().
int parallel_tempering_decide_swap_random | ( | mcmc ** | chains, |
int | n_beta, | ||
int | n_swap | ||
) |
chooses a chain to swap by random. Swaps occur with probability 1/n_swap
References assert, debug, get_next_uniform_random(), and IFVERBOSE.
Referenced by tempering_interaction().
void tempering_interaction | ( | mcmc ** | chains, |
unsigned int | n_beta, | ||
unsigned long | iter | ||
) |
does swapping chains and other mixes.
chains | |
iter | number of iterations that passed. Is a multiple of n_swap. |
n_beta | size of chains |
References inc_swapcount(), parallel_tempering_decide_swap_now(), and parallel_tempering_decide_swap_random().
Referenced by run_sampler().