|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
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 |
---|
Organism chooseMate(Organism female, Lek lek)
female
, from among
all of the organisms at the lek
.
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).
Mating createPairBond(Organism female, Lek lek, Lek alternativeLek)
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.
female
- the organism for whom we require a mate.lek
- XXXalternativeLek
- XXX
Mating
object, or null.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)
java.util.Collection<Mating> findPairs(java.util.Collection<Organism> organisms, Lek lek, Lek alternativeLek)
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.
organisms
- XXXlek
- alternativeLek
-
double getDesirabilityIndex(Organism female, Organism male)
female
- the choosy female.male
- the poor schmuck male.
Lek getLek(Colony colony)
colony
- the colony from which we choose a lek (may be null).
colony
is null.double getMinimumDesirability()
getDesirabilityIndex(Organism, Organism)
org.apache.commons.math.random.RandomGenerator getRandom()
Mating pairUp(Organism female, Lek lek)
Mating
object based on the female given and a
male chosen from the lek.
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).
Mating
object.void setRandom(org.apache.commons.math.random.RandomGenerator random)
random
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |