摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:1 #-*- coding: UTF-8 -*- 2 import numpy as np 3 4 def BucketSort(a, n): 5 barrel = np.zeros((1, n), dtype = 'int32') 6 for i in xrange(0,a.s...
阅读全文
摘要:1 #-*- coding: UTF-8 -*- 2 import numpy as np 3 4 def RadixSort(a): 5 i = 0 #初始为个位排序 6 n = 1 ...
阅读全文
摘要:1 #-*- coding: UTF-8 -*- 2 import numpy as np 3 4 def Merge(a, f, m, l): 5 i = f 6 j = m + 1 7 tmp = [] 8 while i <= m and j <= l: 9...
阅读全文
摘要:1 #-*- coding: UTF-8 -*- 2 import numpy as np 3 4 def MakeHeap(a): 5 for i in xrange(a.size / 2 - 1, -1, -1):#对非叶子节点的子节点进行调节,构建堆 6 Adjus...
阅读全文
摘要:1 #-*- coding: UTF-8 -*- 2 import numpy as np 3 4 def InsertSort(a): 5 for i in xrange(1,a.size): 6 for j in xrange(i,0, -1): 7 ...
阅读全文
摘要:1 #-*- coding: UTF-8 -*- 2 import numpy as np 3 def BubbleSort(a): 4 for i in xrange(0, a.size): 5 for j in xrange(i,a.size): 6 ...
阅读全文
摘要:1 #-*- coding: UTF-8 -*- 2 import numpy as np 3 def SelectSort(a): 4 for i in xrange(0,a.size): 5 min = a[i] 6 p = i 7 fo...
阅读全文