|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rubecula.darwin.domain.genetics.Fecundity_
com.rubecula.darwin.domain.genetics.Fecundity_Saturated
public final class Fecundity_Saturated
Lifespan: permanent.
Default implementation of Fecundity. Fecundity is defined according
to population saturation. See the saturation thresholds:
$DefaultSaturationThresholds.
TODO extend this type with Fecundity_RK which conforms to the RK selection
theory model.
| Field Summary | |
|---|---|
static double[] |
$DefaultSaturationThresholds
If less than 30% saturated, then fecundity = 4; else if less than 75% saturated, then fecundity = 3; else if less than 100% saturated, then fecundity = 2; else if less than 200% saturated, then fecundity = 1; else fecundity = 0; |
| Fields inherited from class com.rubecula.darwin.domain.genetics.Fecundity_ |
|---|
LOG |
| Constructor Summary | |
|---|---|
Fecundity_Saturated()
Constructor using default saturation thresholds, viz. |
|
Fecundity_Saturated(double[] saturationThresholds)
Constructor using default saturation thresholds, viz. |
|
| Method Summary | |
|---|---|
int |
getFecundity(Colony colony)
Get the fecundity for a population whose saturation is given by saturation. |
int |
getFecundity(double saturation)
TODO reduce visibility to default. |
protected double[] |
getSaturationThresholds()
TEST |
void |
setSaturationThresholds(double[] thresholds)
Typically set by bean properties (i.e. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double[] $DefaultSaturationThresholds
| Constructor Detail |
|---|
public Fecundity_Saturated()
$DefaultSaturationThresholds.
public Fecundity_Saturated(double[] saturationThresholds)
$DefaultSaturationThresholds.
saturationThresholds - This is the array of saturation thresholds for calculating
fecundity. The number of possible non-zero fecundity values
which may result is equal to the number of thresholds in the
array. The thresholds must be ordered from highest saturation
to lowest saturation. A saturation value which is higher than
the 0th element will result in a zero fecundity.| Method Detail |
|---|
public int getFecundity(Colony colony)
_SaturationThresholds and which defaults to
$DefaultSaturationThresholds.
colony - the colony to which the progeny will be born.
Fecundity.getFecundity(com.rubecula.darwin.domain.helper.Colony)public int getFecundity(double saturation)
saturation -
public void setSaturationThresholds(double[] thresholds)
thresholds - protected double[] getSaturationThresholds()
setSaturationThresholds(double[]).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||