org.concord.biologica.engine
Class CrossOver
java.lang.Object
|
+--org.concord.biologica.engine.CrossOver
- public class CrossOver
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CrossOver
public CrossOver()
getCrossOverFamily
public Family getCrossOverFamily(Organism one,
Organism two,
int numberOfChildren,
boolean blnOnlyLiveChildren)
- create a new family when doing crossover
- Parameters:
parentOne
- Organism - the first parent of the familyparentTwo
- Organism - the second parent of the familynumberOfChildren
- int - the number of Children in this familyblnCrossOver
- boolean - is Crossover turn on;- Returns:
- Family - the new or existing family
getCrossOverFamily
public Family getCrossOverFamily(Organism one,
Organism two,
int numberFemaleChildren,
int numberMaleChildren,
boolean blnOnlyLiveChildren)
- Create a new family when doing crossover
- Parameters:
one
- Organism - the first parent of the familytwo
- Organism - the second parent of the familynumberFemaleChildren
- int - the number of female ChildrennumberMaleChildren
- int - the number of male ChildrenblnCrossOver
- boolean - is Crossover turn on;- Returns:
- Family - the new or existing family
setPossibility
public void setPossibility(double po)
- change the possibility of crossover
- Parameters:
po
- int - the new possibility value
getPossibility
public double getPossibility()
crossOverOrganism
public Organism crossOverOrganism(Organism org)
- create a fake
- Parameters:
po
- int - the new possibility value
switchAlleles
public Branch[] switchAlleles(Branch b1,
Branch b2)