Muller
sample Muller's potential
|
Muller's Potential sampling program. More...
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <jwsc/base/error.h>
#include <jwsc/base/option.h>
#include <jwsc/math/constants.h>
#include <jwsc/stat/dynamics.h>
#include "sampler.h"
Go to the source code of this file.
Defines | |
#define | NUM_OPTS_NO_ARG 2 |
#define | NUM_OPTS_WITH_ARG 15 |
#define | DEFAULT_SEED 289375 |
#define | DEFAULT_ITERATIONS 1000 |
#define | DEFAULT_HYBRID_LEAP_ITER 100 |
#define | DEFAULT_START_X 0 |
#define | DEFAULT_START_Y 0 |
#define | DEFAULT_X_SIGMA 0.1 |
#define | DEFAULT_X_MIN -3.0 |
#define | DEFAULT_X_MAX 1.5 |
#define | DEFAULT_Y_SIGMA 0.1 |
#define | DEFAULT_Y_MIN -1.0 |
#define | DEFAULT_Y_MAX 3.0 |
#define | DEFAULT_DELTA_T 0.01 |
#define | DEFAULT_ALPHA 0.9 |
#define | DEFAULT_KICK 0 |
#define | DEFAULT_HYPER_GAMMA 1.0e-5 |
#define | DEFAULT_HYPER_ETA 1.0e-2 |
#define | DEFAULT_HYPER_BIAS 150.0 |
#define | DEFAULT_HYPER_SCALE 0.25 |
#define | DEFAULT_SAMPLER MH |
Enumerations | |
enum | Sampler_type { MH, LANGE, HYPER, STOCH, HYBRID } |
Types of samplers supported. More... | |
Functions | |
static void | print_usage (void) |
Prints the usage of the program. | |
static Error * | process_help_opt (void) |
Processes the 'help' program options. | |
static Error * | process_version_opt (void) |
Processes the 'version' program options. | |
static Error * | process_seed_opt (Option_arg arg) |
Processes the 'seed' program options. | |
static Error * | process_iterations_opt (Option_arg arg) |
Processes the 'iterations' program options. | |
static Error * | process_hybrid_leap_iter_opt (Option_arg arg) |
Processes the 'hybrid-leap-iter' program options. | |
static Error * | process_start_x_opt (Option_arg arg) |
Processes the 'start-x' program options. | |
static Error * | process_start_y_opt (Option_arg arg) |
Processes the 'start-y' program options. | |
static Error * | process_delta_t_opt (Option_arg arg) |
Processes the 'delta-t' program options. | |
static Error * | process_alpha_opt (Option_arg arg) |
Processes the 'alpha' program options. | |
static Error * | process_kick_opt (Option_arg arg) |
Processes the 'kick' program options. | |
static Error * | process_x_lim_opt (Option_arg arg) |
Processes the 'x-lim' program options. | |
static Error * | process_x_sigma_opt (Option_arg arg) |
Processes the 'x-sigma' program options. | |
static Error * | process_y_lim_opt (Option_arg arg) |
Processes the 'y-lim' program options. | |
static Error * | process_y_sigma_opt (Option_arg arg) |
Processes the 'y-sigma' program options. | |
static Error * | process_hyper_bias_opt (Option_arg arg) |
Processes the 'hyper-bias' program options. | |
static Error * | process_hyper_scale_opt (Option_arg arg) |
Processes the 'hyper-scale' program options. | |
static Error * | process_sampler_opt (Option_arg arg) |
Processes the 'sampler' program options. | |
int | main (int argc, const char **argv) |
Main function for the surface program. | |
Variables | |
static Option_no_arg | opts_no_arg [NUM_OPTS_NO_ARG] |
Program options taking no argument. | |
static Option_with_arg | opts_with_arg [NUM_OPTS_WITH_ARG] |
Program options taking an argument. | |
static uint32_t | seed = DEFAULT_SEED |
Random seed. | |
static uint32_t | iterations = DEFAULT_ITERATIONS |
Number of sampling iterations. | |
static uint32_t | hybrid_leap_iter = DEFAULT_HYBRID_LEAP_ITER |
Number of leapfrog iterations for hybrid Monte carlo sampling. | |
static double | start_x = DEFAULT_START_X |
Starting x position. | |
static double | start_y = DEFAULT_START_Y |
Starting y position. | |
static double | x_sigma = DEFAULT_X_SIGMA |
Sigma for sampling over x. | |
static double | x_min = DEFAULT_X_MIN |
Minimum value for over x. | |
static double | x_max = DEFAULT_X_MAX |
Maximum value for over x. | |
static double | y_sigma = DEFAULT_Y_SIGMA |
Sigma for sampling over y. | |
static double | y_min = DEFAULT_Y_MIN |
Minimum value for over y. | |
static double | y_max = DEFAULT_Y_MAX |
Maximum value for over y. | |
static double | delta_t = DEFAULT_DELTA_T |
Stochastic dynamics integration step-size for Langevin Monte Carlo. | |
static double | alpha = DEFAULT_ALPHA |
Stochastic dynamics integration step-size for Langevin Monte Carlo. | |
static uint32_t | kick = DEFAULT_KICK |
Stochastic dynamics frequency to kick the particle by resetting the momenta. | |
static double | hyper_bias = DEFAULT_HYPER_BIAS |
Bias strength parameter for hyperdynamics. | |
static double | hyper_scale = DEFAULT_HYPER_SCALE |
Length scale parameter for hyperdynamics. | |
static double | hyper_gamma = DEFAULT_HYPER_GAMMA |
Gamma parameter for gradient descent in hyperdynamics. | |
static double | hyper_eta = DEFAULT_HYPER_ETA |
Eta parameter for derivative approximations in hyperdynamics. | |
static Sampler_type | sampler = DEFAULT_SAMPLER |
Type of sampler to use. |
Muller's Potential sampling program.
Implements a collection of MCMC samplers over Muller's Potential.
Definition in file muller.c.
enum Sampler_type |
static void print_usage | ( | void | ) | [static] |
static Error* process_help_opt | ( | void | ) | [static] |
static Error* process_version_opt | ( | void | ) | [static] |
static Error* process_seed_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_iterations_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_hybrid_leap_iter_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_start_x_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_start_y_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_delta_t_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_alpha_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_kick_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_x_lim_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_x_sigma_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_y_lim_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_y_sigma_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_hyper_bias_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_hyper_scale_opt | ( | Option_arg | arg | ) | [static] |
static Error* process_sampler_opt | ( | Option_arg | arg | ) | [static] |
int main | ( | int | argc, |
const char ** | argv | ||
) |
Option_no_arg opts_no_arg[NUM_OPTS_NO_ARG] [static] |
Option_with_arg opts_with_arg[NUM_OPTS_WITH_ARG] [static] |
uint32_t iterations = DEFAULT_ITERATIONS [static] |
uint32_t hybrid_leap_iter = DEFAULT_HYBRID_LEAP_ITER [static] |
double start_x = DEFAULT_START_X [static] |
double start_y = DEFAULT_START_Y [static] |
double x_sigma = DEFAULT_X_SIGMA [static] |
double x_min = DEFAULT_X_MIN [static] |
double x_max = DEFAULT_X_MAX [static] |
double y_sigma = DEFAULT_Y_SIGMA [static] |
double y_min = DEFAULT_Y_MIN [static] |
double y_max = DEFAULT_Y_MAX [static] |
double delta_t = DEFAULT_DELTA_T [static] |
double alpha = DEFAULT_ALPHA [static] |
uint32_t kick = DEFAULT_KICK [static] |
double hyper_bias = DEFAULT_HYPER_BIAS [static] |
double hyper_scale = DEFAULT_HYPER_SCALE [static] |
double hyper_gamma = DEFAULT_HYPER_GAMMA [static] |
double hyper_eta = DEFAULT_HYPER_ETA [static] |
Sampler_type sampler = DEFAULT_SAMPLER [static] |