📄 colonyinitialization.java
字号:
package test1;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2006</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
public class ColonyInitialization {
public ColonyInitialization() {
}
public double[][] colIn(int k,double[][] aa){
NumberInitialization ss = new NumberInitialization();
double[] initNumber = ss.numIn();
PriceInitialization qq = new PriceInitialization();
double[] initPrice = qq.priIn();
double ant[][] = new double[10][15];
if(k==1){
for (int i = 0; i < ant.length; i++) {
for (int j = 0; j < ant[i].length; ) {
double zz = 5 + 20 * Math.random();
double yy = Math.round(zz);
if (yy <= initNumber[j] && yy * initPrice[j] <= 5000) {
ant[i][j] = yy;
j++;
}
}
System.out.println("");
}
}
if(k>1){
}
return ant;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -