| 1 |
/* |
| 2 |
* Copyright (C) 1996-2011 Daniel Waggoner and Tao Zha |
| 3 |
* |
| 4 |
* This free software: you can redistribute it and/or modify |
| 5 |
* it under the terms of the GNU General Public License as published by |
| 6 |
* the Free Software Foundation, either version 3 of the License, or |
| 7 |
* (at your option) any later version. |
| 8 |
* |
| 9 |
* It is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
* GNU General Public License for more details. |
| 13 |
* |
| 14 |
* If you did not received a copy of the GNU General Public License |
| 15 |
* with this software, see <http://www.gnu.org/licenses/>. |
| 16 |
*/ |
| 17 |
|
| 18 |
#ifndef __DW_MDD_SWITCH__ |
| 19 |
#define __DW_MDD_SWITCH__ |
| 20 |
|
| 21 |
#include "dw_switch.h" |
| 22 |
#include "dw_elliptical.h" |
| 23 |
|
| 24 |
#ifdef __cplusplus |
| 25 |
extern "C" |
| 26 |
{ |
| 27 |
#endif |
| 28 |
|
| 29 |
int dw_marginal_data_density_command_line(int nargs, char **args, TStateModel *model, int generator_init); |
| 30 |
|
| 31 |
PRECISION ComputeLogMarginalDensity_WaggonerZha(TMatrix proposal, TMatrix posterior, PRECISION L1, PRECISION L2, int *in_proposal, int *in_posterior, PRECISION *I); |
| 32 |
PRECISION ComputeLogMarginalDensity_Mueller(TMatrix proposal, TMatrix posterior,int *in1, int *in2); |
| 33 |
PRECISION ComputeLogMarginalDensity_Bridge(TMatrix proposal, TMatrix posterior); |
| 34 |
|
| 35 |
void PosteriorDistributionInfo(FILE *f_in, int flag, TVector center, TMatrix scale, |
| 36 |
PRECISION *alpha, int *dirichlet_dims, PRECISION alpha_scale, int ndraws); |
| 37 |
TVector PosteriorRadius(FILE *f_in, TVector center, TMatrix scale, int ndraws); |
| 38 |
|
| 39 |
TElliptical* CreateEllipticalFromPosterior_TruncatedGaussian(TVector R, int dim, TVector center, TMatrix scale, PRECISION p_lo, PRECISION p_hi); |
| 40 |
TElliptical* CreateEllipticalFromPosterior_Gaussian(TVector R, int dim, TVector center, TMatrix scale); |
| 41 |
TElliptical* CreateEllipticalFromPosterior_TruncatedPower(TVector R, int dim, TVector center, TMatrix scale, PRECISION p_lo, PRECISION p_hi); |
| 42 |
TElliptical* CreateEllipticalFromPosterior_Power(TVector R, int dim, TVector center, TMatrix scale, PRECISION p_hi); |
| 43 |
TElliptical* CreateEllipticalFromPosterior_Uniform(TVector R, int dim, TVector center, TMatrix scale, PRECISION p_lo, PRECISION p_hi); |
| 44 |
TElliptical* CreateEllipticalFromPosterior_Step(TVector R, int dim, TVector center, TMatrix scale, PRECISION p_lo, PRECISION p_hi); |
| 45 |
|
| 46 |
TMatrix CreateProposal(int ndraws, TStateModel* model, TElliptical *elliptical, PRECISION* alpha, int *dirichlet_dims); |
| 47 |
TMatrix CreatePosterior(FILE *f_in, TElliptical *elliptical, PRECISION* alpha, int *dirichlet_dims, int ndraws); |
| 48 |
|
| 49 |
int* CreateDirichletDimensions(TStateModel* model); |
| 50 |
|
| 51 |
#ifdef __cplusplus |
| 52 |
} |
| 53 |
#endif |
| 54 |
|
| 55 |
#endif |