3 * Copyright (C) 1996, 1997, 1998, 1999, 2000 Mark Galassi
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __GSL_SIMAN_H__
21 #define __GSL_SIMAN_H__
23 #include <gsl/gsl_rng.h>
28 # define __BEGIN_DECLS extern "C" {
29 # define __END_DECLS }
31 # define __BEGIN_DECLS /* empty */
32 # define __END_DECLS /* empty */
37 /* types for the function pointers passed to gsl_siman_solve */
39 typedef double (*gsl_siman_Efunc_t) (void *xp);
40 typedef void (*gsl_siman_step_t) (const gsl_rng *r, void *xp, double step_size);
41 typedef double (*gsl_siman_metric_t) (void *xp, void *yp);
42 typedef void (*gsl_siman_print_t) (void *xp);
43 typedef void (*gsl_siman_copy_t) (void *source, void *dest);
44 typedef void * (*gsl_siman_copy_construct_t) (void *xp);
45 typedef void (*gsl_siman_destroy_t) (void *xp);
47 /* this structure contains all the information needed to structure the
48 search, beyond the energy function, the step function and the
52 int n_tries; /* how many points to try for each step */
53 int iters_fixed_T; /* how many iterations at each temperature? */
54 double step_size; /* max step size in the random walk */
55 /* the following parameters are for the Boltzmann distribution */
56 double k, t_initial, mu_t, t_min;
59 /* prototype for the workhorse function */
61 void gsl_siman_solve(const gsl_rng * r,
62 void *x0_p, gsl_siman_Efunc_t Ef,
63 gsl_siman_step_t take_step,
64 gsl_siman_metric_t distance,
65 gsl_siman_print_t print_position,
66 gsl_siman_copy_t copyfunc,
67 gsl_siman_copy_construct_t copy_constructor,
68 gsl_siman_destroy_t destructor,
70 gsl_siman_params_t params);
73 gsl_siman_solve_many (const gsl_rng * r, void *x0_p, gsl_siman_Efunc_t Ef,
74 gsl_siman_step_t take_step,
75 gsl_siman_metric_t distance,
76 gsl_siman_print_t print_position,
78 gsl_siman_params_t params);
82 #endif /* __GSL_SIMAN_H__ */