Blame siman/gsl_siman.h

Packit 67cb25
/* siman/gsl_siman.h
Packit 67cb25
 * 
Packit 67cb25
 * Copyright (C) 1996, 1997, 1998, 1999, 2000 Mark Galassi
Packit 67cb25
 * 
Packit 67cb25
 * This program is free software; you can redistribute it and/or modify
Packit 67cb25
 * it under the terms of the GNU General Public License as published by
Packit 67cb25
 * the Free Software Foundation; either version 3 of the License, or (at
Packit 67cb25
 * your option) any later version.
Packit 67cb25
 * 
Packit 67cb25
 * This program is distributed in the hope that it will be useful, but
Packit 67cb25
 * WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 67cb25
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 67cb25
 * General Public License for more details.
Packit 67cb25
 * 
Packit 67cb25
 * You should have received a copy of the GNU General Public License
Packit 67cb25
 * along with this program; if not, write to the Free Software
Packit 67cb25
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Packit 67cb25
 */
Packit 67cb25
Packit 67cb25
#ifndef __GSL_SIMAN_H__
Packit 67cb25
#define __GSL_SIMAN_H__
Packit 67cb25
#include <stdlib.h>
Packit 67cb25
#include <gsl/gsl_rng.h>
Packit 67cb25
Packit 67cb25
#undef __BEGIN_DECLS
Packit 67cb25
#undef __END_DECLS
Packit 67cb25
#ifdef __cplusplus
Packit 67cb25
# define __BEGIN_DECLS extern "C" {
Packit 67cb25
# define __END_DECLS }
Packit 67cb25
#else
Packit 67cb25
# define __BEGIN_DECLS /* empty */
Packit 67cb25
# define __END_DECLS /* empty */
Packit 67cb25
#endif
Packit 67cb25
Packit 67cb25
__BEGIN_DECLS
Packit 67cb25
Packit 67cb25
/* types for the function pointers passed to gsl_siman_solve */
Packit 67cb25
Packit 67cb25
typedef double (*gsl_siman_Efunc_t) (void *xp);
Packit 67cb25
typedef void (*gsl_siman_step_t) (const gsl_rng *r, void *xp, double step_size);
Packit 67cb25
typedef double (*gsl_siman_metric_t) (void *xp, void *yp);
Packit 67cb25
typedef void (*gsl_siman_print_t) (void *xp);
Packit 67cb25
typedef void (*gsl_siman_copy_t) (void *source, void *dest);
Packit 67cb25
typedef void * (*gsl_siman_copy_construct_t) (void *xp);
Packit 67cb25
typedef void (*gsl_siman_destroy_t) (void *xp);
Packit 67cb25
Packit 67cb25
/* this structure contains all the information needed to structure the
Packit 67cb25
   search, beyond the energy function, the step function and the
Packit 67cb25
   initial guess. */
Packit 67cb25
Packit 67cb25
typedef struct {
Packit 67cb25
  int n_tries;          /* how many points to try for each step */
Packit 67cb25
  int iters_fixed_T;    /* how many iterations at each temperature? */
Packit 67cb25
  double step_size;     /* max step size in the random walk */
Packit 67cb25
  /* the following parameters are for the Boltzmann distribution */
Packit 67cb25
  double k, t_initial, mu_t, t_min;
Packit 67cb25
} gsl_siman_params_t;
Packit 67cb25
Packit 67cb25
/* prototype for the workhorse function */
Packit 67cb25
Packit 67cb25
void gsl_siman_solve(const gsl_rng * r, 
Packit 67cb25
                     void *x0_p, gsl_siman_Efunc_t Ef,
Packit 67cb25
                     gsl_siman_step_t take_step,
Packit 67cb25
                     gsl_siman_metric_t distance,
Packit 67cb25
                     gsl_siman_print_t print_position,
Packit 67cb25
                     gsl_siman_copy_t copyfunc,
Packit 67cb25
                     gsl_siman_copy_construct_t copy_constructor,
Packit 67cb25
                     gsl_siman_destroy_t destructor,
Packit 67cb25
                     size_t element_size,
Packit 67cb25
                     gsl_siman_params_t params);
Packit 67cb25
Packit 67cb25
void 
Packit 67cb25
gsl_siman_solve_many (const gsl_rng * r, void *x0_p, gsl_siman_Efunc_t Ef,
Packit 67cb25
                      gsl_siman_step_t take_step,
Packit 67cb25
                      gsl_siman_metric_t distance,
Packit 67cb25
                      gsl_siman_print_t print_position,
Packit 67cb25
                      size_t element_size,
Packit 67cb25
                      gsl_siman_params_t params);
Packit 67cb25
Packit 67cb25
__END_DECLS
Packit 67cb25
Packit 67cb25
#endif /* __GSL_SIMAN_H__ */