📄 parallel.cc
字号:
for(int j_temp = 0; j_temp <128; j_temp++)
{
Region_Flag[i_temp][j_temp] = 0; //由于数据有缺,这里把边界值和单点覆盖值补全为0
SingleSpotArea[i_temp][j_temp] = 0;
}
////从文件中读入Region_Flag和SingleSpotArea矩阵的值
for(int i=0;i<256;i++)
for(int j=0;j<128;j++)
{
//high[i][j] = 0;
fscanf(fp1,"%f",&high[i][j]);
fscanf(fp4,"%d",&Region_Flag[i][j]);
fscanf(fp5,"%d",&SingleSpotArea[i][j]);
}
fclose(fp1);
fclose(fp4);
fclose(fp5);
}
void SaveTheBest()
{
FILE *fp;
CPoint tempoint;
//FILE *fopen(const char *filename, const char *mode)
//str.Format("f:/qdata/3/%d.%d.txt",hehe,num);
char ch_destination[20] = "/home/qyf/qdata/GA/";
char *ch_source;
switch(hehe)
{
case 10:
switch(num)
{
case 16:
ch_source = "1.0/16.txt";
break;
case 17:
ch_source = "1.0/17.txt";
break;
case 18:
ch_source = "1.0/18.txt";
break;
case 19:
ch_source = "1.0/19.txt";
break;
case 20:
ch_source = "1.0/20.txt";
break;
case 21:
ch_source = "1.0/21.txt";
break;
case 22:
ch_source = "1.0/22.txt";
break;
case 23:
ch_source = "1.0/23.txt";
break;
case 24:
ch_source = "1.0/24.txt";
break;
case 25:
ch_source = "1.0/25.txt";
break;
case 26:
ch_source = "1.0/26.txt";
break;
case 27:
ch_source = "1.0/27.txt";
break;
}
break;
case 9:
switch(num)
{
case 16:
ch_source = "0.9/16.txt";
break;
case 17:
ch_source = "0.9/17.txt";
break;
case 18:
ch_source = "0.9/18.txt";
break;
case 19:
ch_source = "0.9/19.txt";
break;
case 20:
ch_source = "0.9/20.txt";
break;
case 21:
ch_source = "0.9/21.txt";
break;
case 22:
ch_source = "0.9/22.txt";
break;
case 23:
ch_source = "0.9/23.txt";
break;
case 24:
ch_source = "0.9/24.txt";
break;
case 25:
ch_source = "0.9/25.txt";
break;
case 26:
ch_source = "0.9/26.txt";
break;
case 27:
ch_source = "0.9/27.txt";
break;
}
break;
case 8:
switch(num)
{
case 16:
ch_source = "0.8/16.txt";
break;
case 17:
ch_source = "0.8/17.txt";
break;
case 18:
ch_source = "0.8/18.txt";
break;
case 19:
ch_source = "0.8/19.txt";
break;
case 20:
ch_source = "0.8/20.txt";
break;
case 21:
ch_source = "0.8/21.txt";
break;
case 22:
ch_source = "0.8/22.txt";
break;
case 23:
ch_source = "0.8/23.txt";
break;
case 24:
ch_source = "0.8/24.txt";
break;
case 25:
ch_source = "0.8/25.txt";
break;
case 26:
ch_source = "0.8/26.txt";
break;
case 27:
ch_source = "0.8/27.txt";
break;
}
break;
case 7:
switch(num)
{
case 16:
ch_source = "0.7/16.txt";
break;
case 17:
ch_source = "0.7/17.txt";
break;
case 18:
ch_source = "0.7/18.txt";
break;
case 19:
ch_source = "0.7/19.txt";
break;
case 20:
ch_source = "0.7/20.txt";
break;
case 21:
ch_source = "0.7/21.txt";
break;
case 22:
ch_source = "0.7/22.txt";
break;
case 23:
ch_source = "0.7/23.txt";
break;
case 24:
ch_source = "0.7/24.txt";
break;
case 25:
ch_source = "0.7/25.txt";
break;
case 26:
ch_source = "0.7/26.txt";
break;
case 27:
ch_source = "0.7/27.txt";
break;
}
break;
case 6:
switch(num)
{
case 16:
ch_source = "0.6/16.txt";
break;
case 17:
ch_source = "0.6/17.txt";
break;
case 18:
ch_source = "0.6/18.txt";
break;
case 19:
ch_source = "0.6/19.txt";
break;
case 20:
ch_source = "0.6/20.txt";
break;
case 21:
ch_source = "0.6/21.txt";
break;
case 22:
ch_source = "0.6/22.txt";
break;
case 23:
ch_source = "0.6/23.txt";
break;
case 24:
ch_source = "0.6/24.txt";
break;
case 25:
ch_source = "0.6/25.txt";
break;
case 26:
ch_source = "0.6/26.txt";
break;
case 27:
ch_source = "0.6/27.txt";
break;
}
break;
case 5:
switch(num)
{
case 16:
ch_source = "0.5/16.txt";
break;
case 17:
ch_source = "0.5/17.txt";
break;
case 18:
ch_source = "0.5/18.txt";
break;
case 19:
ch_source = "0.5/19.txt";
break;
case 20:
ch_source = "0.5/20.txt";
break;
case 21:
ch_source = "0.5/21.txt";
break;
case 22:
ch_source = "0.5/22.txt";
break;
case 23:
ch_source = "0.5/23.txt";
break;
case 24:
ch_source = "0.5/24.txt";
break;
case 25:
ch_source = "0.5/25.txt";
break;
case 26:
ch_source = "0.5/26.txt";
break;
case 27:
ch_source = "0.5/27.txt";
break;
}
break;
case 4:
switch(num)
{
case 16:
ch_source = "0.4/16.txt";
break;
case 17:
ch_source = "0.4/17.txt";
break;
case 18:
ch_source = "0.4/18.txt";
break;
case 19:
ch_source = "0.4/19.txt";
break;
case 20:
ch_source = "0.4/20.txt";
break;
case 21:
ch_source = "0.4/21.txt";
break;
case 22:
ch_source = "0.4/22.txt";
break;
case 23:
ch_source = "0.4/23.txt";
break;
case 24:
ch_source = "0.4/24.txt";
break;
case 25:
ch_source = "0.4/25.txt";
break;
case 26:
ch_source = "0.4/26.txt";
break;
case 27:
ch_source = "0.4/27.txt";
break;
}
break;
case 3:
switch(num)
{
case 16:
ch_source = "0.3/16.txt";
break;
case 17:
ch_source = "0.3/17.txt";
break;
case 18:
ch_source = "0.3/18.txt";
break;
case 19:
ch_source = "0.3/19.txt";
break;
case 20:
ch_source = "0.3/20.txt";
break;
case 21:
ch_source = "0.3/21.txt";
break;
case 22:
ch_source = "0.3/22.txt";
break;
case 23:
ch_source = "0.3/23.txt";
break;
case 24:
ch_source = "0.3/24.txt";
break;
case 25:
ch_source = "0.3/25.txt";
break;
case 26:
ch_source = "0.3/26.txt";
break;
case 27:
ch_source = "0.3/27.txt";
break;
}
break;
case 2:
switch(num)
{
case 16:
ch_source = "0.2/16.txt";
break;
case 17:
ch_source = "0.2/17.txt";
break;
case 18:
ch_source = "0.2/18.txt";
break;
case 19:
ch_source = "0.2/19.txt";
break;
case 20:
ch_source = "0.2/20.txt";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -