import java.lang.Object; /* * * Task * */ class Task extends Object { // Number of variables public static final int NUMBER_OF_VARIABLES = 2; public double lowerBounds[]; public double upperBounds[]; public double initialPoints[]; public Task() { // Initialize upper and lower bounds or initial points here: lowerBounds = new double[NUMBER_OF_VARIABLES]; upperBounds = new double[NUMBER_OF_VARIABLES]; initialPoints = new double[NUMBER_OF_VARIABLES]; for ( int i = 0; i < NUMBER_OF_VARIABLES; i++ ) { lowerBounds[i] = -5.0; upperBounds[i] = 5.0; } initialPoints[0] = 4;//2; initialPoints[1] = 0;//-4; } static public final double f(double x[], int n) { //return Math.sin(x[0])*Math.sin(x[1]); return Math.pow(x[0],2)+x[1]; } }