com.rubecula.darwin.core
Class MateChoice_Abstract
java.lang.Object
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
- The logger for this class.
MateChoice_Abstract
public MateChoice_Abstract(Random random)
- protected constructor.
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