JAGA Homepage

org.jaga.selection
Class AbsoluteFitness

java.lang.Object
  extended by org.jaga.selection.AbsoluteFitness
All Implemented Interfaces:
Fitness
Direct Known Subclasses:
ClassifierFitness

public class AbsoluteFitness
extends java.lang.Object
implements Fitness

TODO: Complete these comments.

Project: JAGA - Java API for Genetic Algorithms.

Company: University College London and JAGA.Org (http://www.jaga.org).

Copyright: (c) 2004 by G. Paperin.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, ONLY if you include a note of the original author(s) in any redistributed/modified copy.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or see http://www.gnu.org/licenses/gpl.html

Version:
JAGA public release 1.0 beta
Author:
Greg Paperin (greg@jaga.org)

Field Summary
private  double value
           
 
Constructor Summary
private AbsoluteFitness()
           
  AbsoluteFitness(double fitnessValue)
           
 
Method Summary
 double getValue()
           
 boolean isBetter(Fitness fitness)
          Compares this fitness to the specified fitness.
 boolean isWorse(Fitness fitness)
          Compares this fitness to the specified fitness.
 void resetValue(double fitnessValue)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private double value
Constructor Detail

AbsoluteFitness

private AbsoluteFitness()

AbsoluteFitness

public AbsoluteFitness(double fitnessValue)
Method Detail

resetValue

public void resetValue(double fitnessValue)

getValue

public double getValue()

isBetter

public boolean isBetter(Fitness fitness)
Description copied from interface: Fitness
Compares this fitness to the specified fitness.

Specified by:
isBetter in interface Fitness
Parameters:
fitness - - another fitness object.
Returns:
true, if this fitness is "fitter" then the specified, false otherwise.

isWorse

public boolean isWorse(Fitness fitness)
Description copied from interface: Fitness
Compares this fitness to the specified fitness.

Specified by:
isWorse in interface Fitness
Parameters:
fitness - - another fitness object.
Returns:
true, if this fitness is "less fit" then the specified, false otherwise.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

JAGA Homepage

Go to JAGA Homepage