KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sample_dynamics.h
Go to the documentation of this file.
1 
2 /* $Id: sample_dynamics.h 10651 2011-09-29 19:51:42Z predoehl $ */
3 
4 /* =========================================================================== *
5 |
6 | Copyright (c) 1994-2008 by Kobus Barnard (author).
7 |
8 | Personal and educational use of this code is granted, provided that this
9 | header is kept intact, and that the authorship is not misrepresented, that
10 | its use is acknowledged in publications, and relevant papers are cited.
11 |
12 | For other use contact the author (kobus AT cs DOT arizona DOT edu).
13 |
14 | Please note that the code in this file has not necessarily been adequately
15 | tested. Naturally, there is no guarantee of performance, support, or fitness
16 | for any particular task. Nonetheless, I am interested in hearing about
17 | problems that you encounter.
18 |
19 | Author: Luca Del Pero, Joseph Schlecht
20 * =========================================================================== */
21 
22 #ifndef SAMPLE_DYNAMICS_INCLUDED
23 #define SAMPLE_DYNAMICS_INCLUDED
24 
25 #include "m_cpp/m_vector.h"
26 
27 namespace kjb {
28 
32  (
33  unsigned int iterations,
34  const kjb::Vector & delta_t,
35  double alpha,
36  unsigned int kick,
37  kjb::Vector & parameters,
38  int (*compute_energy_gradient)(const Vector & parameters, Vector & out_gradient),
39  int (*accept_sample)(const Vector & parameters),
40  int (*log_sample)(const Vector & parameters, const Vector & momenta )
41  );
42 
43 
44 }
45 
46 #endif
47 
48 
int stochastic_dynamics(unsigned int iterations, const Vector &delta_t, double alpha, unsigned int kick, Vector &parameters, int(*compute_energy_gradient)(const Vector &parameters, Vector &out_gradient), int(*accept_sample)(const Vector &parameters), int(*log_sample)(const Vector &parameters, const Vector &momenta))
Double precision leapfrog stochastic dynamics.
Definition: sample_dynamics.cpp:64
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
Definition for the Vector class, a thin wrapper on the KJB Vector struct and its related functionalit...