【opencv450-samples】旅行商问题(模拟退火算法Simulated Annealing,SA)
运行结果视频演示源码:#include#include#include#includeusingnamespacecv;classTravelSalesman{private:conststd::vector&posCity;//城市坐标std::vector&next;//后续城市索引向量;路线末端索引向量RNGrng;intd0,d1,d2,d3;//随机城市索引,以及后续三个城市索引publ