LALInference 4.1.9.1-eeff03c
LALInferenceKombineSampler.h
Go to the documentation of this file.
1/*
2 *
3 * LALInferenceKombineSampler: Ensemble Markov-Chain Monte Carlo sampler for LALInference
4 * LALInferenceKombineSampler.h: main header file
5 *
6 * Copyright (C) 2014 Ben Farr
7 *
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with with program; see the file COPYING. If not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22 * MA 02110-1301 USA
23 */
24
25/**
26 * \file LALInferenceKombineSampler.h
27 * \ingroup lalapps_inspiral
28 * \brief Ensemble Markov-Chain Monte Carlo sampler written for LALInference.
29 *
30 * Ensemble Markov-Chain Monte Carlo sampler.
31 *
32 */
33
34#include <lal/LALInference.h>
35
36/** The sampling algorithm */
38
39
40/** Evolve a walker a single step */
42 REAL8 *proposed_prior, REAL8 *proposed_likelihood, REAL8 *proposed_prop_density);
43
44/** Update the ensemble proposal from the ensemble's current state */
45REAL8 get_acceptance_rate(LALInferenceRunState *run_state, REAL8 *local_acceptance_rates);
46
48
51 INT4 nwalkers,
52 INT4 cyclic_reflective);
53
54/* Data IO routines */
57 INT4 rank);
58
60 FILE *output,
61 REAL8* prop_priors,
62 REAL8* prop_likelihoods,
63 REAL8* prop_densities,
64 REAL8* acceptance_rates,
65 INT4 rank);
66
68 FILE *output,
69 REAL8* logprior,
70 REAL8* loglike,
71 REAL8* prop_density);
72
74
75char* ensemble_output_name(const char *out_type, INT4 rank);
76
78 INT4 rank);
79
81 INT4 rank);
void parallel_incremental_kmeans(LALInferenceRunState *run_state, REAL8 *samples, INT4 nwalkers, INT4 cyclic_reflective)
char * ensemble_output_name(const char *out_type, INT4 rank)
void print_proposal_header(LALInferenceRunState *run_state, INT4 rank)
void print_proposed_sample(LALInferenceThreadState *thread)
void print_samples(LALInferenceRunState *run_state, FILE *output, REAL8 *prop_priors, REAL8 *prop_likelihoods, REAL8 *prop_densities, REAL8 *acceptance_rates, INT4 rank)
FILE * print_ensemble_header(LALInferenceRunState *run_state, INT4 rank)
void ensemble_update(LALInferenceRunState *run_state)
REAL8 get_acceptance_rate(LALInferenceRunState *run_state, REAL8 *local_acceptance_rates)
Update the ensemble proposal from the ensemble's current state.
void print_evidence(LALInferenceRunState *run_state, FILE *output, REAL8 *logprior, REAL8 *loglike, REAL8 *prop_density)
FILE * init_ensemble_output(LALInferenceRunState *run_state, INT4 verbose, INT4 rank)
void walker_step(LALInferenceRunState *run_state, LALInferenceThreadState *thread, REAL8 *proposed_prior, REAL8 *proposed_likelihood, REAL8 *proposed_prop_density)
Evolve a walker a single step.
void ensemble_sampler(LALInferenceRunState *run_state)
The sampling algorithm.
double REAL8
int32_t INT4
Structure containing inference run state This includes pointers to the function types required to run...
Definition: LALInference.h:592
Structure containing chain-specific variables.
Definition: LALInference.h:541