private void InitTheta() { double[] arr = new double[this.popsize]; for (int i = 0; i < this.popsize; i++) { double min = Double.MaxValue; for (int j = 0; j < popsize; j++) { if (i == j) { continue; } double tp = Tool.GetAngle(weights[i], weights[j]); if (tp < min) { min = tp; } } arr[i] = min; } thetam = Tool.ArrayMax(arr); }