摘要:FAIndividual.py 1 import numpy as np 2 import ObjFunction 3 4 5 class FAIndividual: 6 7 ''' 8 individual of firefly algorithm 9 '''10 1...
阅读全文
摘要:ESIndividual.py 1 import numpy as np 2 import ObjFunction 3 4 5 class ESIndividual: 6 7 ''' 8 individual of evolutionary strategy 9 '''...
阅读全文
摘要:HSIndividual.py 1 import numpy as np 2 import ObjFunction 3 4 5 class HSIndividual: 6 7 ''' 8 individual of harmony search algorithm 9 ...
阅读全文
摘要:CSAIndividual.py 1 import numpy as np 2 import ObjFunction 3 4 5 class CSAIndividual: 6 7 ''' 8 individual of clone selection algorithm 9 ...
阅读全文
摘要:BFOIndividual.py 1 import numpy as np 2 import ObjFunction 3 4 5 class BFOIndividual: 6 7 ''' 8 individual of baterial clony foraging algor...
阅读全文
摘要:BAIndividual.py 1 import numpy as np 2 import ObjFunction 3 4 5 class BAIndividual: 6 7 ''' 8 individual of bat algorithm 9 '''10 11 ...
阅读全文
摘要:AIAIndividual.py 1 import numpy as np 2 import ObjFunction 3 4 5 class AIAIndividual: 6 7 ''' 8 individual of artificial immune algorithm 9...
阅读全文
摘要:AFSIndividual.py 1 import numpy as np 2 import ObjFunction 3 import copy 4 5 6 class AFSIndividual: 7 8 """class for AFSIndividual""" 9 10 ...
阅读全文
摘要:ABSIndividual.py 1 import numpy as np 2 import ObjFunction 3 4 5 class ABSIndividual: 6 7 ''' 8 individual of artificial bee swarm algorith...
阅读全文
摘要:PSOIndividual.py 1 import numpy as np 2 import ObjFunction 3 import copy 4 5 6 class PSOIndividual: 7 8 ''' 9 individual of PSO10 '''11...
阅读全文
摘要:DEIndividual.py 1 import numpy as np 2 import ObjFunction 3 4 5 class DEIndividual: 6 7 ''' 8 individual of differential evolution algorith...
阅读全文
摘要:ObjFunction.py 1 import math 2 3 4 def GrieFunc(vardim, x, bound): 5 """ 6 Griewangk function 7 """ 8 s1 = 0. 9 s2 = 1.10 fo...
阅读全文
摘要:1 #-*- coding: UTF-8 -*- 2 import numpy as np 3 from QuickSort import QuickSort 4 5 def BucketSort(a, n): 6 barrel = {} 7 for i in xrange(0,...
阅读全文
摘要:1 #-*- coding: UTF-8 -*- 2 import numpy as np 3 4 def ShellSort(a): 5 gap = a.size / 2 6 while gap >= 1: 7 for i in xrange(gap,a.siz...
阅读全文
摘要:Map函数:原型:map(function, sequence),作用是将一个列表映射到另一个列表,使用方法:def f(x): return x**2l = range(1,10)map(f,l)Out[3]: [1, 4, 9, 16, 25, 36, 49, 64, 81]Reduce函数原型:reduce(function, sequence, startValue),作用是将一个列表归纳为一个输出,使用方法:def f2(x,y): return x+yreduce(f1,l)Out[7]: 45reduce(f2,l,10)Out[8]: 55Filter函数原型:filter..
阅读全文