private double[] alphafunction(double[] x){
  if (numberOfObjectives == 2) {
    if (pType == 21) {
      return new double[]{x[0],1 - Math.sqrt(x[0])};
    }
 else     if (pType == 22) {
      return new double[]{x[0],1 - x[0] * x[0]};
    }
 else     if (pType == 23) {
      return new double[]{x[0],1 - Math.sqrt(x[0]) - x[0] * Math.sin(10 * x[0] * x[0]* Math.PI)};
    }
 else     if (pType == 24) {
      return new double[]{x[0],1 - x[0] - 0.05 * Math.sin(4 * Math.PI * x[0])};
    }
 else {
      throw new IllegalStateException();
    }
  }
 else   if (numberOfObjectives == 3) {
    if (pType == 31) {
      return new double[]{Math.cos(x[0] * Math.PI / 2) * Math.cos(x[1] * Math.PI / 2),Math.cos(x[0] * Math.PI / 2) * Math.sin(x[1] * Math.PI / 2),Math.sin(x[0] * Math.PI / 2)};
    }
 else     if (pType == 32) {
      return new double[]{1 - Math.cos(x[0] * Math.PI / 2) * Math.cos(x[1] * Math.PI / 2),1 - Math.cos(x[0] * Math.PI / 2) * Math.sin(x[1] * Math.PI / 2),1 - Math.sin(x[0] * Math.PI / 2)};
    }
 else     if (pType == 33) {
      return new double[]{x[0],x[1],3 - (Math.sin(3 * Math.PI * x[0]) + Math.sin(3 * Math.PI * x[1])) - 2 * (x[0] + x[1])};
    }
 else     if (pType == 34) {
      return new double[]{x[0] * x[1],x[0] * (1 - x[1]),(1 - x[0])};
    }
 else {
      throw new IllegalStateException();
    }
  }
 else {
    throw new IllegalStateException();
  }
}

private double [ ] alphafunction ( double [ ] x ) { if ( numberOfObjectives == 2 ) { if ( pType == 21 ) { return new double [ ] { x [ 0 ] , 1 - Math . sqrt ( x [ 0 ] ) } ; } else if ( pType == 22 ) { return new double [ ] { x [ 0 ] , 1 - x [ 0 ] * x [ 0 ] } ; } else if ( pType == 23 ) { return new double [ ] { x [ 0 ] , 1 - Math . sqrt ( x [ 0 ] ) - x [ 0 ] * Math . sin ( 10 * x [ 0 ] * x [ 0 ] * Math . PI ) } ; } else if ( pType == 24 ) { return new double [ ] { x [ 0 ] , 1 - x [ 0 ] - 0.05 * Math . sin ( 4 * Math . PI * x [ 0 ] ) } ; } else { throw new IllegalStateException ( ) ; } } else if ( numberOfObjectives == 3 ) { if ( pType == 31 ) { return new double [ ] { Math . cos ( x [ 0 ] * Math . PI / 2 ) * Math . cos ( x [ 1 ] * Math . PI / 2 ) , Math . cos ( x [ 0 ] * Math . PI / 2 ) * Math . sin ( x [ 1 ] * Math . PI / 2 ) , Math . sin ( x [ 0 ] * Math . PI / 2 ) } ; } else if ( pType == 32 ) { return new double [ ] { 1 - Math . cos ( x [ 0 ] * Math . PI / 2 ) * Math . cos ( x [ 1 ] * Math . PI / 2 ) , 1 - Math . cos ( x [ 0 ] * Math . PI / 2 ) * Math . sin ( x [ 1 ] * Math . PI / 2 ) , 1 - Math . sin ( x [ 0 ] * Math . PI / 2 ) } ; } else if ( pType == 33 ) { return new double [ ] { x [ 0 ] , x [ 1 ] , 3 - ( Math . sin ( 3 * Math . PI * x [ 0 ] ) + Math . sin ( 3 * Math . PI * x [ 1 ] ) ) - 2 * ( x [ 0 ] + x [ 1 ] ) } ; } else if ( pType == 34 ) { return new double [ ] { x [ 0 ] * x [ 1 ] , x [ 0 ] * ( 1 - x [ 1 ] ) , ( 1 - x [ 0 ] ) } ; } else { throw new IllegalStateException ( ) ; } } else { throw new IllegalStateException ( ) ; } }
controls the pareto front shape .
