com.rubecula.darwin.core
Interface Fitness

All Known Implementing Classes:
Fitness_Abstract, Fitness_Default, Fitness_PepperedMoth

public interface Fitness

Defines fitness functions for Darwinian (Evolutionary Computation) Systems.

Version:
$Revision: 1.1 $
Author:
Robin Hillyard

Method Summary
 double getFitness(Trait trait, EcoFactor factor)
          Method to evaluate the fitness of a trait of type Trait with respect to an environmental factor of type EcoFactor.
 double getWeight(Trait trait, EcoFactor factor)
          Method to get the weight fora trait/factor pair (see above).
 

Method Detail

getFitness

double getFitness(Trait trait,
                  EcoFactor factor)
Method to evaluate the fitness of a trait of type Trait with respect to an environmental factor of type EcoFactor.

Parameters:
trait - the trait to be evaluated in the environment.
factor - the environmental factor.
Returns:
a value between 0 (unfit) and 1 (fit).

getWeight

double getWeight(Trait trait,
                 EcoFactor factor)
Method to get the weight fora trait/factor pair (see above).

Parameters:
trait - the trait to be evaluated in the environment.
factor - the environmental factor.
Returns:
any value greater than 0 if the pairing is significant, otherwise 0.