jmetal.operators.mutation
Class SwapMutation

java.lang.Object
  extended by jmetal.core.Operator
      extended by jmetal.operators.mutation.Mutation
          extended by jmetal.operators.mutation.SwapMutation
All Implemented Interfaces:
java.io.Serializable

public class SwapMutation
extends Mutation

This class implements a swap mutation. The solution type of the solution must be Permutation.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jmetal.core.Operator
parameters_
 
Constructor Summary
SwapMutation(java.util.HashMap<java.lang.String,java.lang.Object> parameters)
          Constructor
 
Method Summary
 void doMutation(double probability, Solution solution)
          Performs the operation
 java.lang.Object execute(java.lang.Object object)
          Executes the operation
 
Methods inherited from class jmetal.core.Operator
getParameter, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwapMutation

public SwapMutation(java.util.HashMap<java.lang.String,java.lang.Object> parameters)
Constructor

Method Detail

doMutation

public void doMutation(double probability,
                       Solution solution)
                throws JMException
Performs the operation

Parameters:
probability - Mutation probability
solution - The solution to mutate
Throws:
JMException

execute

public java.lang.Object execute(java.lang.Object object)
                         throws JMException
Executes the operation

Specified by:
execute in class Operator
Parameters:
object - An object containing the solution to mutate
Returns:
an object containing the mutated solution
Throws:
JMException