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

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

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

Random fitness function.

Version:
$Revision: 225 $ $Date: 2007-01-08 23:25:51 -0600 (Mon, 08 Jan 2007) $
Author:
Michael Heuer

Constructor Summary
RandomFitness()
          Create a new random fitness function with a default source of randomness.
RandomFitness(Random random)
          Create a new random fitness function with the specified source of randomness.
 
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

RandomFitness

public RandomFitness()
Create a new random fitness function with a default source of randomness.


RandomFitness

public RandomFitness(Random random)
Create a new random fitness function with the specified source of randomness.

Parameters:
random - source of randomness for this random fitness 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).