public int getMaxJ(double[] D){
		double maxValue = 0.0;
		int maxIndex = 0;
		for ( int j = 0; j < x.length; j++ ){
			if ( j == 0 ){
				maxValue = getValue(D, j);
				maxIndex = j;
			}
			else if ( maxValue < getValue(D,j) ) {
				maxValue = getValue(D, j);
				maxIndex = j;				
			}
		}
		return maxIndex;
	}