gt: 		for (int i = 0; i < this.valueTypes.length; i++) {
context: /**
   * Copyright (C) 2001-2016 by RapidMiner and the contributors
   *
   * Complete list of developers available at our web site:
   *
   * http://rapidminer.com
   *
   * This program is free software: you can redistribute it and/or modify it under the terms of the
   * GNU Affero General Public License as published by the Free Software Foundation, either version 3
   * of the License, or (at your option) any later version.
   *
   * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
   * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   * Affero General Public License for more details.
   *
   * You should have received a copy of the GNU Affero General Public License along with this program.
   * If not, see http://www.gnu.org/licenses/.
   */
  package com.rapidminer.tools.math.optimization.ec.es;
  
  import java.util.Collection;
  import java.util.Iterator;
  import java.util.LinkedList;
  import java.util.List;
  import java.util.concurrent.atomic.AtomicInteger;
  
  import com.rapidminer.datatable.DataTable;
  import com.rapidminer.datatable.SimpleDataTable;
  import com.rapidminer.datatable.SimpleDataTableRow;
  import com.rapidminer.gui.plotter.SimplePlotterDialog;
  import com.rapidminer.operator.Operator;
  import com.rapidminer.operator.OperatorException;
  import com.rapidminer.operator.performance.PerformanceVector;
  import com.rapidminer.parameter.ParameterType;
  import com.rapidminer.parameter.ParameterTypeBoolean;
  import com.rapidminer.parameter.ParameterTypeCategory;
  import com.rapidminer.parameter.ParameterTypeDouble;
  import com.rapidminer.parameter.ParameterTypeInt;
  import com.rapidminer.parameter.conditions.BooleanParameterCondition;
  import com.rapidminer.parameter.conditions.EqualTypeCondition;
  import com.rapidminer.tools.LoggingHandler;
  import com.rapidminer.tools.RandomGenerator;
  import com.rapidminer.tools.math.optimization.Optimization;
  
  
  /**
   * Evolutionary Strategy approach for all real-valued optimization tasks.
   *
   * @author Ingo Mierswa
   */
  public abstract class ESOptimization implements Optimization {
  
  	public static final String PARAMETER_MAX_GENERATIONS = "max_generations";
  	public static final String PARAMETER_USE_EARLY_STOPPING = "use_early_stopping";
  	public static final String PARAMETER_GENERATIONS_WITHOUT_IMPROVAL = "generations_without_improval";
  	public static final String PARAMETER_POPULATION_SIZE = "population_size";
  	public static final String PARAMETER_TOURNAMENT_FRACTION = "tournament_fraction";
  	public static final String PARAMETER_KEEP_BEST = "keep_best";
  	public static final String PARAMETER_MUTATION_TYPE = "mutation_type";
  	public static final String PARAMETER_SELECTION_TYPE = "selection_type";
  	public static final String PARAMETER_CROSSOVER_PROB = "crossover_prob";
  	public static final String PARAMETER_SHOW_CONVERGENCE_PLOT = "show_convergence_plot";
  	public static final String PARAMETER_SPECIFIY_POPULATION_SIZE = "specify_population_size";
  
  	/** The names of all available selection schemes. */
  	public static final String[] SELECTION_TYPES = { "uniform", "cut", "roulette wheel", "stochastic universal sampling",
  			"Boltzmann", "rank", "tournament", "non dominated sorting" };
  
  	/** Indicates a uniform sampling selection scheme. */
  	public static final int UNIFORM_SELECTION = 0;
  
  	/** Indicates a cut selection scheme. */
  	public static final int CUT_SELECTION = 1;
  
  	/** Indicates a roulette wheel selection scheme. */
  	public static final int ROULETTE_WHEEL = 2;
  
  	/** Indicates a stochastic universal sampling selection scheme. */
  	public static final int STOCHASTIC_UNIVERSAL = 3;
  
  	/** Indicates a Boltzmann selection scheme. */
  	public static final int BOLTZMANN_SELECTION = 4;
  
  	/** Indicates a rank based selection scheme. */
  	public static final int RANK_SELECTION = 5;
  
  	/** Indicates a tournament selection scheme. */
  	public static final int TOURNAMENT_SELECTION = 6;
  
  	/** Indicates a multi-objective selection scheme (NSGA II). */
  	public static final int NON_DOMINATED_SORTING_SELECTION = 7;
  
  	/** The names of the mutation types. */
  	public static final String[] MUTATION_TYPES = { "none", "gaussian_mutation", "switching_mutation", "sparsity_mutation" };
  
  	/** Indicates no mutation. */
  	public static final int NO_MUTATION = 0;
  
  	/** Indicates a gaussian mutation. */
  	public static final int GAUSSIAN_MUTATION = 1;
  
  	/** Indicates a switching mutation. */
  	public static final int SWITCHING_MUTATION = 2;
  
  	/** Indicates a hybrid between switching mutation and Gaussian mutation. */
  	public static final int SPARSITY_MUTATION = 3;
  
  	/** The names of the initialization types. */
  	public static final String[] POPULATION_INIT_TYPES = { "random", "min", "max" };
  
  	/** Indicates that the start population should be randomly initialized. */
  	public static final int INIT_TYPE_RANDOM = 0;
  
  	/** Indicates that the start population should be initialized with the minimum value. */
  	public static final int INIT_TYPE_MIN = 1;
  
  	/** Indicates that the start population should be initialized with the maximum value. */
  	public static final int INIT_TYPE_MAX = 2;
  
  	/** Indicates that the start population should be initialized with one. */
  	public static final int INIT_TYPE_ONE = 3;
  
  	/** Indicates that the start population should be initialized with zero. */
  	public static final int INIT_TYPE_ZERO = 4;
  
  	/** This parameter indicates the minimum value for all genes. */
  	private double[] min;
  
  	/** This parameter indicates the maximum value for all genes. */
  	private double[] max;
  
  	/** The value types, either DOUBLE (default) or INT. */
  	private OptimizationValueType[] valueTypes;
  
  	/** The number of individuals. */
  	private int populationSize;
  
  	/** The dimension of each individual. */
  	private int individualSize;
  
  	/** The maximum number of generations. */
  	private int maxGenerations;
  
  	/** The maximum numbers of generations without improvement. */
  	private int generationsWithoutImprovement;
  
  	/** The type of start population initialization. */
  	private int initType = INIT_TYPE_RANDOM;
  
  	/** The type of the mutation. */
  	// private int mutationType = GAUSSIAN_MUTATION;
  
  	/** The population plotter (if enabled). */
  	private PopulationPlotter populationPlotter = null;
  
  	/** The mutation operator. */
  	private Mutation mutation;
  
  	/** The current population. */
  	private Population population;
  
  	/** Population operators. */
  	private Collection<PopulationOperator> popOps;
  
  	/** Indicates if a convergence plot should be drawn. */
  	private boolean showConvergencePlot = false;
  
  	/** This field counts the total number of evaluations during optimization. */
  	private AtomicInteger totalEvalCounter = new AtomicInteger();
  
  	/**
  	 * This field counts the number of actually calculated evaluations (unchanged individuals do not
  	 * have to be re-evaluated).
  	 */
  	private AtomicInteger currentEvalCounter = new AtomicInteger();
  
  	/** The random number generator. */
  	private RandomGenerator random;
  
  	private LoggingHandler logging;
  	private Individual currentBest;
  	private Operator executingOperator = null;
  
  	/**
  	 * Creates a new evolutionary SVM optimization which also checks for Stop if the
  	 * executingOperator is set.
  	 */
  	@Deprecated
  	public ESOptimization(double[] minValues, double[] maxValues, int populationSize, int individualSize, int initType, // population
  																														 // paras
  			int maxGenerations, int generationsWithoutImprovement, // GA paras
  			int selectionType, double tournamentFraction, boolean keepBest, // selection paras
  			int mutationType, // type of mutation
  			double defaultSigma, double crossoverProb, boolean showConvergencePlot, boolean showPopulationPlot,
  			RandomGenerator random, LoggingHandler logging) {
  
  		this(minValues, maxValues, populationSize, individualSize, initType, maxGenerations, generationsWithoutImprovement,
  				selectionType, tournamentFraction, keepBest, mutationType, defaultSigma, crossoverProb, showConvergencePlot,
  				showPopulationPlot, random, logging, null);
  	}
  
  	/** Creates a new evolutionary SVM optimization. */
  	@Deprecated
  	public ESOptimization(double minValue, double maxValue, int populationSize, int individualSize, int initType, // population
  																													 // paras
  			int maxGenerations, int generationsWithoutImprovement, // GA paras
  			int selectionType, double tournamentFraction, boolean keepBest, // selection paras
  			int mutationType, // type of mutation
  			double crossoverProb, boolean showConvergencePlot, boolean showPopulationPlot, RandomGenerator random,
  			LoggingHandler logging) {
  		this(createBoundArray(minValue, individualSize), createBoundArray(maxValue, individualSize), populationSize,
  				individualSize, initType, maxGenerations, generationsWithoutImprovement, selectionType, tournamentFraction,
  				keepBest, mutationType, Double.NaN, crossoverProb, showConvergencePlot, showPopulationPlot, random, logging,
  				null);
  	}
  
  	/**
  	 * Creates a new evolutionary SVM optimization which also checks for Stop if the
  	 * executingOperator is set.
  	 *
  	 * @param executingOperator
  	 *            If this parameter is null, no exception will be thrown.
  	 */
  	public ESOptimization(double minValue, double maxValue, int populationSize, int individualSize, int initType, // population
  																													 // paras
  			int maxGenerations, int generationsWithoutImprovement, // GA paras
  			int selectionType, double tournamentFraction, boolean keepBest, // selection paras
  			int mutationType, // type of mutation
  			double crossoverProb, boolean showConvergencePlot, boolean showPopulationPlot, RandomGenerator random,
  			LoggingHandler logging, Operator executingOperator) {
  		this(createBoundArray(minValue, individualSize), createBoundArray(maxValue, individualSize), populationSize,
  				individualSize, initType, maxGenerations, generationsWithoutImprovement, selectionType, tournamentFraction,
  				keepBest, mutationType, Double.NaN, crossoverProb, showConvergencePlot, showPopulationPlot, random, logging,
  				executingOperator);
  	}
  
  	/**
  	 * Creates a new evolutionary SVM optimization.
  	 *
  	 * @param executingOperator
  	 *            If this parameter is null, no exception will be thrown.
  	 *
  	 */
  	public ESOptimization(double[] minValues, double[] maxValues, int populationSize, int individualSize, int initType, // population
  																														 // paras
  			int maxGenerations, int generationsWithoutImprovement, // GA paras
  			int selectionType, double tournamentFraction, boolean keepBest, // selection paras
  			int mutationType, // type of mutation
  			double defaultSigma, double crossoverProb, boolean showConvergencePlot, boolean showPopulationPlot,
  			RandomGenerator random, LoggingHandler logging, Operator executingOperator) {
  		this.logging = logging;
  		this.random = random;
  		this.showConvergencePlot = showConvergencePlot;
  		this.populationSize = populationSize;
  		this.individualSize = individualSize;
  		this.min = minValues;
  		this.max = maxValues;
  		this.valueTypes = new OptimizationValueType[individualSize];
  		this.executingOperator = executingOperator;
  