This file contains data structure and subroutines implementing Markov Chain Monte Carlo sampler.
More...
|
void | _choldc (double **a, int n, double *p) |
|
int | _acor (double *mean, double *sigma, double *tau, double *X, int L) |
|
void | mcmc_alloc (mcmc_recs *recs, int nstep, int nwalker, int ndim, int nvalue) |
|
void | mcmc_free (mcmc_recs *recs) |
|
void | mcmc_statistics (double *mean, double *sigma, double *tau, mcmc_recs *recs) |
|
void | mcmc_save_fits (char const *fname, mcmc_opts *opts, mcmc_recs *recs, int include_last=false) |
|
void | mcmc_load_fits (char const *fname, mcmc_opts *opts, mcmc_recs *recs, int alloc=true) |
|
void | mcmc_append_recs (mcmc_recs *dst, mcmc_recs *src) |
|
void | mcmc_report (mcmc_opts *opts, mcmc_recs *recs, char const *mode) |
|
void | mcmc_init (ObjectiveFunction_t lnprob, double **par, mcmc_opts *opts, mcmc_recs *recs, void *obj) |
|
void | mcmc_advance (ObjectiveFunction_t lnprob, mcmc_opts *opts, mcmc_recs *recs, void *obj) |
|
double | mcmc_stretch_move (double *newp, double **oldp, int iwalker, int nwalker, int ndim, mcmc_opts *opts) |
|
void | mcmc_walk_move (double *newp, double **oldp, int k, int nwalker, int np, mcmc_opts *opts) |
|
This file contains data structure and subroutines implementing Markov Chain Monte Carlo sampler.
Author : Cheng Li, California Institute of Technology
Contact : cli@g.nosp@m.ps.c.nosp@m.altec.nosp@m.h.ed.nosp@m.u
Revision history :
- June 21 2015, initial document
- July 18 2016, remove MathHelper dependence
Definition in file mcmc.hpp.
void _choldc |
( |
double ** |
a, |
|
|
int |
n, |
|
|
double * |
p |
|
) |
| |
Given a positive definite symmetric matrix a[0..n-1][0..n-1], this subroutine constructs its Cholesky decomposition: A = L*L'. On input, only the upper triangle of A need be given; it is not modified. The Cholesky factor L is returned in the lower triangle of A, except for its diagonal elements which are returned in p[0..n-1]. see Numerical Recipes in C, pg 97
Definition at line 27 of file mcmc.cpp.