sdt.ga
Class Fitness

java.lang.Object
  |
  +--sdt.ga.Fitness

public abstract class Fitness
extends java.lang.Object
implements Result, java.io.Serializable, Comparable, AveragePopProperties

Different GA's need to return different types of values. The variables to be returned are unique for every GA. Therefore for every new GA implementation , the user must write a class that extend Fitness.

See Also:
Serialized Form

Constructor Summary
Fitness()
          Create an instance of the Fitness.
 
Method Summary
 java.lang.Object clone()
          Implementation of the clone method.
protected  void finalize()
          For garbage collection
abstract  double getFitnessValue()
          Returns the fitness value.
 boolean isFitnessEvaluated()
          returns if the fitness has been evaluated.
static Fitness newInstance(GeneticAlgorithm ga)
          creates a newInstace of a sub class from the super class
 void setFitnessEvaluated(boolean fitnessEvaluated)
          sets the variable indicating the status of the fitness evaluation.
abstract  java.lang.String toString()
          Returns a string representation of the fitness class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Fitness

public Fitness()
Create an instance of the Fitness.
Method Detail

newInstance

public static Fitness newInstance(GeneticAlgorithm ga)
creates a newInstace of a sub class from the super class

setFitnessEvaluated

public void setFitnessEvaluated(boolean fitnessEvaluated)
sets the variable indicating the status of the fitness evaluation.

isFitnessEvaluated

public boolean isFitnessEvaluated()
returns if the fitness has been evaluated.

getFitnessValue

public abstract double getFitnessValue()
Returns the fitness value.

toString

public abstract java.lang.String toString()
Returns a string representation of the fitness class.
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
Implementation of the clone method.
Overrides:
clone in class java.lang.Object

finalize

protected void finalize()
                 throws java.lang.Throwable
For garbage collection
Overrides:
finalize in class java.lang.Object