|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlio.crossover.bitchain.TwoPointCrossover
public class TwoPointCrossover
Implements the two point crossover operator for chains of bits.
Constructor Summary | |
---|---|
TwoPointCrossover()
Creates a new instance of OnePointCrossover |
|
TwoPointCrossover(int pPoint1,
int pPoint2)
Creates a new instance of OnePointCrossover with a given point of crossover |
Method Summary | |
---|---|
Individual[] |
cross(Individual parent1,
Individual parent2)
Crosses two individuals. |
LiOResourceDefinition |
getDefinition()
Return a LiOResDescription object which holds the name and all parameters that describe the resource. |
int |
getPoint1()
Returns the point of crossover. |
int |
getPoint2()
Returns the point of crossover. |
int |
getSizeOffSpring()
|
static void |
main(java.lang.String[] args)
Main class that allows testing the class. |
void |
setPoint1(int pPoint1)
Sets the point of crossover. |
void |
setPoint2(int pPoint2)
Sets the point of crossover. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TwoPointCrossover()
public TwoPointCrossover(int pPoint1, int pPoint2)
pPoint1
- First point of crossover.pPoint2
- Second point of crossover.Method Detail |
---|
public int getSizeOffSpring()
getSizeOffSpring
in interface Crossover
public LiOResourceDefinition getDefinition()
getDefinition
in interface LiOResource
public void setPoint1(int pPoint1)
pPoint
- point of crossover.public int getPoint1()
public void setPoint2(int pPoint2)
pPoint
- point of crossover.public int getPoint2()
public Individual[] cross(Individual parent1, Individual parent2)
cross
in interface Crossover
parent1
- First parentparent2
- Second parent
public static void main(java.lang.String[] args)
args
- Arguments passed by command line
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |