10 2018 档案

摘要:来自头文件 #include <stdlib.h> atoi()函数用来将字符串转换成整数(int) int atoi(const char* str) ; 从流中获取字符串: char* fgets(char*str, int num, FILE*stream ); num: 最大字符个数,包括终 阅读全文
posted @ 2018-10-28 16:19 卷积 阅读(670) 评论(0) 推荐(0)
摘要:参考来源: https://am207.github.io/2017/wiki/lab4.html#traveling-salesman-problem-tsp 《现代优化理论与方法》黄庆道等编.上册P165, 在解决旅行商问题时,用到了模拟退火算法。 1.Metropolis准则 该准则表示以概率 阅读全文
posted @ 2018-10-17 20:40 卷积 阅读(362) 评论(0) 推荐(0)
摘要:1.numpy.random.choice() 2.numpy.random.randint() 生成在[Low, high)上离散均匀分布的整数值。 如果high=None, 则取值区间变为[0,Low) 阅读全文
posted @ 2018-10-17 10:34 卷积 阅读(195) 评论(0) 推荐(0)
摘要:参考来源: https://realpython.com/python-range/ 1. Python range() 函数可创建一个整数列表,一般用在for循环中。 三种方法可以调用range()。 (1) range(stop) :输出从0开始到stop-1的整数。 (2) range(sta 阅读全文
posted @ 2018-10-17 10:21 卷积 阅读(1433) 评论(0) 推荐(0)
摘要:参考原文:https://www.cnblogs.com/CCBB/archive/2010/01/15/1648827.html http://www.cplusplus.com/reference/cstdlib/qsort/ 1.函数原型: 2.使用例子 输出为 : 阅读全文
posted @ 2018-10-14 15:39 卷积 阅读(288) 评论(0) 推荐(0)