摘要:
% Good Node Set Matalb-codefunction [GD] = Goodnode(M,N) % M is the number of points; N is the dimension if (nargin==0) M=100; N=2; end %% tmp1 = [1: 阅读全文
摘要:
1. 适应度函数: function z=chaffer(x)%chaffer函数x=(0...0) f(x)=0 x[-10,10]%%没测 n=10; s1=0; for i=1:n s1=s1+x(i)^2; end z=((sin(sqrt(s1)))^2-0.5)/(1+0.001*s1) 阅读全文
摘要:
import itertools k = int(input("请输入整数:")) while k > 1: # 单个 num_set = [num for num in range(1, k+1)] arr_set = list(itertools.permutations(num_set, le 阅读全文
摘要:
import itertools from collections import Counter k = int(input("请输入整数:")) num_set = [num for num in range(1, k+1)] arr_set = list(itertools.permutatio 阅读全文