private void initializePopulation2D(int populationSize){
  population=new ArrayList<Individual>(populationSize);
  population.add(new Individual(new double[]{0.0,1.0}));
  population.add(new Individual(new double[]{1.0,0.0}));
  for (int i=1; i < populationSize - 1; i++) {
    double a=i / (double)(populationSize - 1);
    population.add(new Individual(new double[]{a,1 - a}));
  }
}

private void initializePopulation2D ( int populationSize ) { population = new ArrayList < Individual > ( populationSize ) ; population . add ( new Individual ( new double [ ] { 0.0 , 1.0 } ) ) ; population . add ( new Individual ( new double [ ] { 1.0 , 0.0 } ) ) ; for ( int i = 1 ; i < populationSize - 1 ; i ++ ) { double a = i / ( double ) ( populationSize - 1 ) ; population . add ( new Individual ( new double [ ] { a , 1 - a } ) ) ; } }
initializes the population for 2d problems .
