org.dishevelled.evolve.fitness
Class FitnessTransform<I>

java.lang.Object
  extended by org.dishevelled.evolve.fitness.FitnessTransform<I>
Type Parameters:
I - individual type
All Implemented Interfaces:
Fitness<I>

public final class FitnessTransform<I>
extends Object
implements Fitness<I>

Fitness transform.

Version:
$Revision$ $Date$
Author:
Michael Heuer

Constructor Summary
FitnessTransform(Fitness<I> fitness, UnaryFunction<Double,Double> transform)
          Create a new fitness transform with the specified fitness function and transform function.
 
Method Summary
 Double score(I individual)
          Return a measure of fitness for the specified individual.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FitnessTransform

public FitnessTransform(Fitness<I> fitness,
                        UnaryFunction<Double,Double> transform)
Create a new fitness transform with the specified fitness function and transform function.

Parameters:
fitness - fitness function to transform, must not be null
transform - transform function, must not be null
Method Detail

score

public Double score(I individual)
Return a measure of fitness for the specified individual.

Specified by:
score in interface Fitness<I>
Parameters:
individual - individual
Returns:
a measure of fitness for the specified individual


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