扩大
缩小

模拟退火

http://www.cnblogs.com/heaad/archive/2010/12/20/1911614.html

写的已经很好了

伪代码:

while(T > Tmin) {
    to = cur + delta;
    double De = calc(to) - calc(cur);
    if (De > 0 || exp(De / kT) > rand(0, 1))
        cur = to;
    T = T * r;
}
posted @ 2017-05-25 14:06  HPLV  阅读(122)  评论(0编辑  收藏  举报