00001 /* $Id: xsh_model_sa.h,v 1.4 2008/05/23 09:08:18 amodigli Exp $ 00002 * 00003 * This file is part of the ESO X-shooter Pipeline 00004 * Copyright (C) 2006 European Southern Observatory 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 */ 00020 /* sa.h Prototypes for Simulated Annealing library */ 00021 00022 /* rcsid: @(#)sa.h 1.2 15:54:42 3/30/93 EFC */ 00023 00024 #ifndef XSH_MODEL_SA_H 00025 #define XSH_MODEL_SA_H 1.2 00026 00027 #include "xsh_model_kernel.h" 00028 00029 typedef float (*CostFunction)(double*); 00030 00031 00032 /* the value that causes the "set/query" functions to just query */ 00033 #define NO_VALUE -1 00034 #define NO_VALUE_INT -1 00035 #define NO_VALUE_FLOAT -1.0 00036 00037 int xsh_SAInit(CostFunction f, int d); 00038 void xsh_SAfree(void); 00039 int xsh_SAiterations(int it); 00040 int xsh_SAdwell(int d); 00041 float xsh_SABoltzmann(float k); 00042 float xsh_SAlearning_rate(float r); 00043 float xsh_SAtemperature(float t); 00044 float xsh_SAjump(float j); 00045 float xsh_SArange(float r); 00046 void xsh_SAinitial(double* xi); 00047 void xsh_SAcurrent(double* xc); 00048 void xsh_SAoptimum(double* xb); 00049 float xsh_SAmelt(int iters); 00050 float xsh_SAanneal(int iters); 00051 00052 #endif 00053 00054