lio.mutation.contchain
Class RandomMutation

java.lang.Object
  extended by lio.mutation.contchain.RandomMutation
All Implemented Interfaces:
LiODependentResource, LiOResource, Mutation

public class RandomMutation
extends java.lang.Object
implements Mutation, LiODependentResource


Constructor Summary
RandomMutation()
           
 
Method Summary
 LiOResourceDefinition getDefinition()
          Return a LiOResDescription object with the information of each object.
 void getTaskInformation(LiOTask task)
          Allows passing information of the task to the resource.
static void main(java.lang.String[] args)
          Main class that allows testing the class.
 void mutate(Individual ind)
          Applies mutation to one position choosen at random.
 void mutate(Individual ind, double probability)
          Applies mutation to each position depending on the probability.
 void setBounds(ContChainBounds bounds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomMutation

public RandomMutation()
Method Detail

getTaskInformation

public void getTaskInformation(LiOTask task)
Allows passing information of the task to the resource.

Specified by:
getTaskInformation in interface LiODependentResource
Parameters:
task - Task.

setBounds

public void setBounds(ContChainBounds bounds)

mutate

public void mutate(Individual ind)
Applies mutation to one position choosen at random.

Specified by:
mutate in interface Mutation
Parameters:
individual - Individual that will be mutated.

mutate

public void mutate(Individual ind,
                   double probability)
Applies mutation to each position depending on the probability.

Specified by:
mutate in interface Mutation
Parameters:
individual - Individual that will be mutated.
pMutationProbability - probability of carrying out the mutation.

getDefinition

public LiOResourceDefinition getDefinition()
Return a LiOResDescription object with the information of each object. That object holds the name and all parameters that describe the object

Specified by:
getDefinition in interface LiOResource
Returns:
A definition of the object.

main

public static void main(java.lang.String[] args)
Main class that allows testing the class.

Parameters:
args - Arguments passed by command line