com.rubecula.darwin.domain.helper
Interface MateChoice

All Known Implementing Classes:
MateChoice_, MateChoice_Evaluator, MateChoice_PepperedMoth, MateChoice_Wrightian

public interface MateChoice

Defines methods to determine how mates are chosen. In the current implementation, male mates are always chosen by females, never the other way around.

Version:
$Revision: 1.10 $
Author:
Robin Hillyard

Method Summary
 Organism chooseMate(Organism female, Lek lek)
          Choose the best (male) mate for the given female, from among all of the organisms at the lek.
 Mating createPairBond(Organism female, Lek lek, Lek alternativeLek)
          First, we call pairUp(Organism, Lek) for the female, lek and the appropriate genomic.
 java.util.Collection<Mating> findPairs(java.util.Collection<Organism> organisms, Lek lek, Lek alternativeLek)
          Method to enumerate a set of mating pairs: females from this Colony and males from either the lek or the alternativeLek .
 double getDesirabilityIndex(Organism female, Organism male)
          Method to determine the desirability of a given male in the eyes, etc.
 Lek getLek(Colony colony)
          Method to get a "lek", that is to say a population of breeding males.
 double getMinimumDesirability()
           
 org.apache.commons.math.random.RandomGenerator getRandom()
          Getter/setter typically called by reflection, but also called via this interface.
 Mating pairUp(Organism female, Lek lek)
          Method to create a Mating object based on the female given and a male chosen from the lek.
 void setRandom(org.apache.commons.math.random.RandomGenerator random)
          Getter/setter typically called by reflection.
 

Method Detail

chooseMate

Organism chooseMate(Organism female,
                    Lek lek)
Choose the best (male) mate for the given female, from among all of the organisms at the lek.

Parameters:
female -
lek - a collection of organisms from which to choose a (male) mate for the given female, (note that not all of the organisms are male, some are competing females).
Returns:
an appropriate male (or null if none live up to expectations).

createPairBond

Mating createPairBond(Organism female,
                      Lek lek,
                      Lek alternativeLek)
First, we call pairUp(Organism, Lek) for the female, lek and the appropriate genomic. If this is not-null, we return it. Otherwise, we invoke Insular.isIsolated() and IF the result is false, AND if the alternative lek is not null and its colony is not the same as this colony, THEN we invoke pairUp(Organism, Lek) for the female, alternativeLek and the appropriate genomic. We return the result. This method should only be called if the female organism is in fact female.

Parameters:
female - the organism for whom we require a mate.
lek - XXX
alternativeLek - XXX
Returns:
a newly constructed Mating object, or null.
See Also:
com.rubecula.darwin.domain.helper.Colony#createPairBond(com.rubecula.darwin.domain.helper.MateChoice, com.rubecula.darwin.domain.helper.Organism, com.rubecula.darwin.domain.world.Lek, com.rubecula.darwin.domain.world.Lek, Genomic)

findPairs

java.util.Collection<Mating> findPairs(java.util.Collection<Organism> organisms,
                                       Lek lek,
                                       Lek alternativeLek)
Method to enumerate a set of mating pairs: females from this Colony and males from either the lek or the alternativeLek . Unlike the rest of the Darwin package, there IS an asymmetry here between the sexes. Every female organism is involved in exactly one mating per generation. However, males are chosen randomly and can therefore be involved in any number of matings in a given generation.

Parameters:
organisms - XXX
lek -
alternativeLek -
Returns:
a Vector of Mating objects.

getDesirabilityIndex

double getDesirabilityIndex(Organism female,
                            Organism male)
Method to determine the desirability of a given male in the eyes, etc. of a given female.

Parameters:
female - the choosy female.
male - the poor schmuck male.
Returns:
the desirability from 0 (not desirable) through infinity (totally desirable).

getLek

Lek getLek(Colony colony)
Method to get a "lek", that is to say a population of breeding males.

Parameters:
colony - the colony from which we choose a lek (may be null).
Returns:
a restartable Iterator with an appropriate number of individuals chosen from the population, based on the sampleFraction for this MateChoice. Note that this method will return null if colony is null.

getMinimumDesirability

double getMinimumDesirability()
Returns:
a value for the desirability threshold for choosing a mate (same scale as the desirability index, see getDesirabilityIndex(Organism, Organism)

getRandom

org.apache.commons.math.random.RandomGenerator getRandom()
Getter/setter typically called by reflection, but also called via this interface.

Returns:
the random

pairUp

Mating pairUp(Organism female,
              Lek lek)
Method to create a Mating object based on the female given and a male chosen from the lek.

Parameters:
female -
lek - a collection of organisms from which to choose a (male) mate for the given female, (note that not all of the organisms are male, some are competing females).
Returns:
a newly constructed Mating object.

setRandom

void setRandom(org.apache.commons.math.random.RandomGenerator random)
Getter/setter typically called by reflection.

Parameters:
random -


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.