// Path: src/jeco/core/problem/Variable.java
// public class Variable<T> {
//     protected T value;
// 
//     public Variable(T value) {
//         this.value = value;
//     }
// 
//     public T getValue() { return value; }
// 
//     public void setValue(T value) { this.value = value; }
//     
//     @Override
//     public Variable<T> clone() {
//         return new Variable<T>(value);
//     }
// 
//     @SuppressWarnings("unchecked")
// 		@Override
//     public boolean equals(Object right) {
//         Variable<T> var = (Variable<T>)right;
//         return this.value.equals(var.value);
//     }
//     
//     @Override
//     public String toString()
//     {
//     	return value.toString();
//     }
// }


import java.util.ArrayList;
import jeco.core.problem.Solution;
import jeco.core.problem.Variable;
import jeco.core.util.random.RandomGenerator;
package jeco.core.operator.mutation;


/**
 * Mutation that removes an element from the chromosome and includes a new element
 * not previously selected; given that is based on integer, it needs a maximum
 * value to be restricted to.
 * 
 * @author J. M. Colmenar
 */
public class CombinatorialMutation extends MutationOperator<Variable<Integer>> {

    int minValue;
    int maxValue;
    
    /**
     * Changes each gene with an integer value not selected and avoiding
     * repetitions.
     * 
     * @param probability 
     * @param minValue minnimum value to be selected (included)
     * @param maxValue maximum value to be selected (included)
     */
    public CombinatorialMutation(double probability, int minValue, int maxValue) {
        super(probability);
        
        this.minValue = minValue;
        this.maxValue = maxValue;
    }

    @Override
// Path: src/jeco/core/problem/Variable.java
// public class Variable<T> {
//     protected T value;
// 
//     public Variable(T value) {
//         this.value = value;
//     }
// 
//     public T getValue() { return value; }
// 
//     public void setValue(T value) { this.value = value; }
//     
//     @Override
//     public Variable<T> clone() {
//         return new Variable<T>(value);
//     }
// 
//     @SuppressWarnings("unchecked")
// 		@Override
//     public boolean equals(Object right) {
//         Variable<T> var = (Variable<T>)right;
//         return this.value.equals(var.value);
//     }
//     
//     @Override
//     public String toString()
//     {
//     	return value.toString();
//     }
// }


// Path: src/jeco/core/operator/mutation/CombinatorialMutation.java
import java.util.ArrayList;
import jeco.core.problem.Solution;
import jeco.core.problem.Variable;
import jeco.core.util.random.RandomGenerator;

package jeco.core.operator.mutation;


/**
 * Mutation that removes an element from the chromosome and includes a new element
 * not previously selected; given that is based on integer, it needs a maximum
 * value to be restricted to.
 * 
 * @author J. M. Colmenar
 */
public class CombinatorialMutation extends MutationOperator<Variable<Integer>> {

    int minValue;
    int maxValue;
    
    /**
     * Changes each gene with an integer value not selected and avoiding
     * repetitions.
     * 
     * @param probability 
     * @param minValue minnimum value to be selected (included)
     * @param maxValue maximum value to be selected (included)
     */
    public CombinatorialMutation(double probability, int minValue, int maxValue) {
        super(probability);
        
        this.minValue = minValue;
        this.maxValue = maxValue;
    }

    @Override
    public Solution<Variable<Integer>> execute(Solution<Variable<Integer>> solution) {        