算法
XiaoMeow
这个作者很懒,什么都没留下…
展开
-
Geatpy 摸板
原创 2021-05-19 00:06:28 · 160 阅读 · 0 评论 -
遗传算法
###### 遗传算法包geatpy的官方例子 ############import numpy as npimport geatpy as eaimport time"""========================= 目标函数 ====================="""def aim(Phen): x1=Phen[:,[0]] x2=Phen[:,[1]] return np.sin(x1+x2)+(x1-x2)**2-1.5*x1+2.5*x2+1...原创 2021-05-18 11:29:54 · 238 阅读 · 0 评论 -
Python实现多项式辗转相除法
1.辗转相除法求两个整数的最大公约数(log用来记录运算过程,可删除)import mathdef rollDivision(f1,f2,log): if(isinstance(f1,int) and isinstance(f2,int)): if f2>f1: temp=f1 f1=f2 ...原创 2019-07-15 19:35:55 · 5873 阅读 · 2 评论