sa.h

来自「anneal_SimulatedAnnealing.rar用C语言编写」· C头文件 代码 · 共 66 行

H
66
字号
/* sa.h	  	Prototypes for Simulated Annealing library *//* rcsid: @(#)sa.h	1.2 15:54:42 3/30/93   EFC   */#ifndef SA_PACKAGE_H_#define SA_PACKAGE_H_ 1.2#ifdef NO_PROTOtypedef float (*CostFunction)();#elsetypedef float (*CostFunction)(float*);#endif/* the value that causes the "set/query" functions to just query */#define NO_VALUE	-1#define NO_VALUE_INT   -1#define NO_VALUE_FLOAT -1.0#ifdef __cplusplusextern "C" {#endif#ifdef NO_PROTOint SAInit();void SAfree();int SAiterations();int SAdwell();float SABoltzmann();float SAlearning_rate();float SAtemperature();float SAjump();float SArange();void SAinitial();void SAcurrent();void SAoptimum();float SAmelt();float SAanneal();#elseint SAInit(CostFunction f, int d);void SAfree();int SAiterations(int it);int SAdwell(int d);float SABoltzmann(float k);float SAlearning_rate(float r);float SAtemperature(float t);float SAjump(float j);float SArange(float r);void SAinitial(float* xi);void SAcurrent(float* xc);void SAoptimum(float* xb);float SAmelt(int iters);float SAanneal(int iters);#endif#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?