20 #ifndef SAMPLE_REAL_H_INCLUDED
21 #define SAMPLE_REAL_H_INCLUDED
25 #include "l/l_sys_lib.h"
35 using namespace kjb_c;
48 using namespace kjb_c;
63 get_real_model_parameter<Model>);
84 template<
typename Model>
109 move_real_model_parameter<Model>,
111 get_real_model_dimension<Model>
129 move_real_model_parameter<Model>,
131 get_real_model_dimension<Model>
146 template<
typename Model,
147 bool CONSTRAINED_TARGET =
false,
148 bool INCLUDE_ACCEPT_STEP =
true,
149 bool REVERSIBLE =
true>
179 int num_dynamics_steps,
187 move_real_model_parameter<Model>,
189 get_real_model_dimension<Model>,
210 int num_dynamics_steps,
218 move_real_model_parameter<Model>,
220 get_real_model_dimension<Model>,
241 int num_dynamics_steps,
251 move_real_model_parameter<Model>,
253 get_real_model_dimension<Model>,
254 get_real_model_parameter<Model>,
274 template<
class Model,
bool REVERSIBLE = true>
Parent::Target_distribution Target_distribution
Definition: sample_real.h:90
Parent::Get_lower_bounds Get_lower_bounds
Definition: sample_step.h:1076
Real_hmc_step< Model, false, REVERSIBLE > Type
Definition: sample_real.h:277
Approximates the gradient of a target distribution, evaluated at a certain location. The model in question must be a vector model.
Definition: sample_real.h:85
int get_real_model_dimension(const Model &)
Dimension for any model that implements the size() member function.
Definition: sample_real.h:74
Parent::Get_upper_bounds Get_upper_bounds
Definition: sample_step.h:1077
Parent::Gradient Gradient
Definition: sample_real.h:156
Definition: sample_step.h:1062
Real_numerical_gradient(const Target_distribution &log_target, const Get_neighborhood &get_neighborhood)
Construct this functor.
Definition: sample_real.h:102
#define ASSERT(condition, message)
Definition: Assert.h:45
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
void set_real_model_parameter(Model &m, int i, double x)
Parameter setter for anything that implements operator[].
Definition: sample_real.h:46
Parent::Target_distribution Target_distribution
Definition: sample_real.h:155
double get_real_model_parameter(const Model &m, int i)
Parameter getter for anything that implements operator[].
Definition: sample_real.h:33
Parent::Get_step_size Get_step_size
Definition: sample_step.h:1071
Parent::Get_lower_bounds Get_lower_bounds
Definition: sample_real.h:158
Parent::Get_neighborhood Get_neighborhood
Definition: sample_real.h:91
Model_parameter_evaluator< Model >::Type Get_neighborhood
Definition: sample_default.h:104
Default move function; uses '+'.
Definition: sample_default.h:37
x
Definition: APPgetLargeConnectedEdges.m:100
Model_evaluator< Model >::Type Target_distribution
Definition: sample_default.h:102
Definition: sample_real.h:275
Definition: sample_real.h:150
Returns the same result no matter what model is received.
Definition: sample_default.h:68
virtual ~Real_hmc_step()
Definition: sample_real.h:260
Numerical_gradient< Model > Parent
Definition: sample_real.h:88
Parent::Gradient Gradient
Definition: sample_step.h:1069
void move_real_model_parameter(Model &m, int i, double x)
Parameter mover for anything that implements operator[] and whose elements are double.
Definition: sample_real.h:60
Real_hmc_step(const Target_distribution &log_target, int num_dynamics_steps, const Gradient &gradient, const Get_step_size &get_step_size, double alpha=0.0)
Creates a Real_hmc_step.
Definition: sample_real.h:177
Parent::Target_distribution Target_distribution
Definition: sample_step.h:1068
get the indices of edges in each direction for i
Definition: APPgetLargeConnectedEdges.m:48
for m
Definition: APPgetLargeConnectedEdges.m:64
Basic_hmc_step< Model, CONSTRAINED_TARGET, INCLUDE_ACCEPT_STEP, REVERSIBLE > Parent
Definition: sample_real.h:153
Parent::Get_step_size Get_step_size
Definition: sample_real.h:157
Parent::Get_upper_bounds Get_upper_bounds
Definition: sample_real.h:159
Approximates the gradient and/or curvature of a target distribution, evaluated at a certain location...
Definition: sample_default.h:99