com.rubecula.darwin.core
Class MateChoice_Abstract

java.lang.Object
  extended by com.rubecula.darwin.core.MateChoice_Abstract
All Implemented Interfaces:
MateChoice
Direct Known Subclasses:
MateChoice_Default, MateChoice_PepperedMoth

public abstract class MateChoice_Abstract
extends Object
implements MateChoice

Abstract class defining the base methods of MateChoice.

Author:
Robin Hillyard

Field Summary
protected static org.apache.commons.logging.Log log
          The logger for this class.
 
Constructor Summary
MateChoice_Abstract(Random random)
          protected constructor.
 
Method Summary
 double getDesirabilityIndex(Organism female, Organism male)
          Method to determine the desirability of a given male in the eyes, etc.
protected  Random getRandom()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.rubecula.darwin.core.MateChoice
getMinimumDesirability
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
The logger for this class.

Constructor Detail

MateChoice_Abstract

public MateChoice_Abstract(Random random)
protected constructor.

Method Detail

getDesirabilityIndex

public double getDesirabilityIndex(Organism female,
                                   Organism male)
Description copied from interface: MateChoice
Method to determine the desirability of a given male in the eyes, etc. of a given female.

Specified by:
getDesirabilityIndex in interface MateChoice
Parameters:
female - the choosy female.
male - the poor schmuck male.
Returns:
the desirability from 0 (not desirable) through infinity (totally desirable).

getRandom

protected Random getRandom()
Returns:
the random