org.dishevelled.evolve.mutate
Class ProportionalMutation<I>

java.lang.Object
  extended by org.dishevelled.evolve.mutate.ProportionalMutation<I>
Type Parameters:
I - individual type
All Implemented Interfaces:
Mutation<I>

public final class ProportionalMutation<I>
extends Object
implements Mutation<I>

Proportional mutation function.

Version:
$Revision: 1059 $ $Date: 2012-01-03 14:03:02 -0600 (Tue, 03 Jan 2012) $
Author:
Michael Heuer

Constructor Summary
ProportionalMutation()
          Create a new proportional mutation function.
 
Method Summary
 void add(IndividualWiseMutation<I> mutation, double weight)
          Add the specified individual-wise mutation function to this proportional mutation function at the specified weight.
 Collection<I> mutate(Collection<I> recombined)
          Mutate the individuals in the specified collection of recombined individuals.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProportionalMutation

public ProportionalMutation()
Create a new proportional mutation function.

Method Detail

add

public void add(IndividualWiseMutation<I> mutation,
                double weight)
Add the specified individual-wise mutation function to this proportional mutation function at the specified weight.

Parameters:
mutation - individual-wise mutation function, must not be null
weight - weight

mutate

public Collection<I> mutate(Collection<I> recombined)
Mutate the individuals in the specified collection of recombined individuals.

Specified by:
mutate in interface Mutation<I>
Parameters:
recombined - collection of recombined individuals
Returns:
a collection of mutated individuals


Copyright (c) 2005-2012 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).