|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvertexcover.GAOperators
public class GAOperators
Constructor Summary | |
---|---|
GAOperators()
|
Method Summary | |
---|---|
static boolean[][] |
bCrossOnePoint(boolean[][] parents)
Performs one-point cross over with two parents = boolean arrays. |
static boolean[][] |
bCrossTwoPoint(boolean[][] parents)
Performs two-point cross over with two parents = boolean arrays. |
static boolean[][] |
bCrossUniform(boolean[][] parents)
Performs uniform cross over with two parents = boolean arrays. |
static boolean[] |
bMutate(boolean[] chromosome,
double pMut)
With given probability swaps elements of the given boolean array to its opposite value |
static int[][] |
iCrossOnePoint(int[][] parents)
Performs one-point cross over with two parents = integer arrays. |
static int[][] |
iCrossTwoPoint(int[][] parents)
Performs two-point cross over with two parents = integer arrays. |
static int[][] |
iCrossUniform(int[][] parents)
Performs uniform cross over with two parents = integer arrays. |
static int[] |
iMutate(int[] chromosome,
double pMut,
int maxValue)
With given probability changes elements of the given integer array to random value |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GAOperators()
Method Detail |
---|
public static int[][] iCrossUniform(int[][] parents)
parents
- two integer arrays to cross
public static boolean[][] bCrossUniform(boolean[][] parents)
parents
- two boolean arrays to cross
public static boolean[][] bCrossOnePoint(boolean[][] parents)
parents
- two boolean arrays to cross
public static int[][] iCrossOnePoint(int[][] parents)
parents
- two integer arrays to cross
public static boolean[][] bCrossTwoPoint(boolean[][] parents)
parents
- two boolean arrays to cross
public static int[][] iCrossTwoPoint(int[][] parents)
parents
- two integer arrays to cross
public static boolean[] bMutate(boolean[] chromosome, double pMut)
chromosome
- array to mutatepMut
- probability of mutation
public static int[] iMutate(int[] chromosome, double pMut, int maxValue)
chromosome
- array to mutatepMut
- probability of mutationmaxValue
- maximal value to set
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |