org.artoflife.gp.individual
Class MutableFitnessIndividual
java.lang.Object
|
+--org.artoflife.gp.Individual
|
+--org.artoflife.gp.individual.MutableFitnessIndividual
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public abstract class MutableFitnessIndividual
- extends Individual
An Individual
that holds a mutable Fitness
property. Not for Individuals that determine fitness by evaluation of a
fitness function over their phenotype, but useful for image-creation with an
external fitness evaluation.
- Author:
- Steve Meyfroidt
- See Also:
- Serialized Form
Field Summary |
protected Fitness |
fitness
This Individual's Fitness: default is 5.0f. |
Method Summary |
java.lang.Object |
clone()
Override to deep clone fitness field. |
Fitness |
getFitness()
The Fitness object returned can be changed if required. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fitness
protected Fitness fitness
- This Individual's Fitness: default is 5.0f.
MutableFitnessIndividual
public MutableFitnessIndividual(Phenotype phenotype,
java.util.Collection chromosomes)
- Parameters:
phenotype
- chromosomes
-
MutableFitnessIndividual
public MutableFitnessIndividual(Phenotype phenotype,
Chromosome chromosome)
- Parameters:
phenotype
- chromosome
-
getFitness
public Fitness getFitness()
- The Fitness object returned can be changed if required.
- Specified by:
getFitness
in class Individual
- Returns:
- this Individual's Fitness, never null
clone
public java.lang.Object clone()
- Override to deep clone fitness field.
- Overrides:
clone
in class Individual
- Returns:
- an Individual that is an independent deep clone.
Copyright © 2002 the Art Of Life team. All Rights Reserved.