eaLib API Docs
Last Modified : January 7 2002

mss.ea.core
Interface Fitness

All Superinterfaces:
java.lang.Comparable, java.io.Serializable
All Known Implementing Classes:
DefaultFitness

public interface Fitness
extends java.lang.Comparable, java.io.Serializable

Interface for fitness values. The fitness of an individual is represented by a float number. A bigger float number is a better fitness. The smallest possible fitness should be 0.0.

Since:
0.1
Version:
$Revision: 1.3 $ $Date: 2001/11/22 12:46:43 $
Author:
Andreas Rummler

Field Summary
static long serialVersionUID
          Serialization version identifier.
 
Method Summary
 float getValue()
          Deprecated. replaced by value() due to consistency reasons compared to Score interface
 boolean isBetter(Fitness fn)
          Test, if fitness is better than other fitness.
 boolean isEqual(Fitness fn)
          Test, if fitness equals with other fitness.
 boolean isWorse(Fitness fn)
          Test, if fitness is worse than other fitness.
 void setValue(float value)
          Sets the fitness value.
 float value()
          Gets the fitness value.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serialization version identifier.
Method Detail

setValue

public void setValue(float value)
Sets the fitness value.
Parameters:
value - new fitness value

getValue

public float getValue()
Deprecated. replaced by value() due to consistency reasons compared to Score interface

Gets the fitness value.
Returns:
current fitness value

value

public float value()
Gets the fitness value.
Returns:
current fitness value

isBetter

public boolean isBetter(Fitness fn)
Test, if fitness is better than other fitness.
Parameters:
fn - fitness, to be compared with
Returns:
result of test

isWorse

public boolean isWorse(Fitness fn)
Test, if fitness is worse than other fitness.
Parameters:
fn - other fitness, to be compared with
Returns:
result of test

isEqual

public boolean isEqual(Fitness fn)
Test, if fitness equals with other fitness.
Parameters:
fn - other fitness, to be compared with
Returns:
result of test

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS