public class populationbinary
extends java.lang.Object
implements java.lang.Cloneable
It contains the methods for handling the binary population of individuals
Modifier and Type | Method and Description |
---|---|
void |
AND_operator(int indiv1,
int indiv2,
int i)
Given the individuals "indiv1" and "indiv2", it selects two points
and makes the AND operation between their central zones.
|
java.lang.Object |
clone() |
char[] |
Code(int i,
int[] vector,
int pos) |
void |
Generalization_operator(int i) |
void |
GenerationalCrossover() |
char[] |
Individual(int i,
Int_t tama) |
void |
InitialPopulation(int[][] sujeto,
int tama,
int[] tama_dom) |
int |
Mixed_Crossover(int indiv1,
int indiv2,
int i) |
boolean |
Modified(int i) |
void |
OR_operator(int indiv1,
int indiv2,
int i)
Given the individuals "indiv1" and "indiv2", it selects two points
and makes the OR operation between their central zones.
|
void |
Paint(int i) |
void |
PaintFitness(int i) |
void |
PaintFitnessInFile(int i) |
void |
PaintInFile(int i) |
void |
Pass(int i,
populationbinary x,
int j) |
void |
Put_NotModified() |
void |
PutValue(int indiv,
int bit,
char value) |
void |
Rotation(int i)
Given the individual "i", a rotation operation is made.
|
void |
Sort() |
void |
Swap_bool(boolean[] v,
int i,
int j) |
void |
Swap_double(double[] v,
int i,
int j) |
void |
Swap_int(int[] v,
int i,
int j) |
void |
Swap(int i,
int j) |
void |
TwoPointsCrossover_operator(int indiv1,
int indiv2,
int i,
int a)
Given the individuals "indiv1" and "indiv2", it selects two points
exchanging their central zones.
|
void |
UniformMutation()
Uniform mutation operator
|
public java.lang.Object clone()
clone
in class java.lang.Object
public char[] Individual(int i, Int_t tama)
public boolean Modified(int i)
public void Put_NotModified()
public void Pass(int i, populationbinary x, int j)
public void Swap(int i, int j)
public void Swap_int(int[] v, int i, int j)
public void Swap_double(double[] v, int i, int j)
public void Swap_bool(boolean[] v, int i, int j)
public char[] Code(int i, int[] vector, int pos)
public void Sort()
public void Paint(int i)
public void PaintFitness(int i)
public void PaintInFile(int i) throws java.io.IOException
java.io.IOException
public void PaintFitnessInFile(int i) throws java.io.IOException
java.io.IOException
public void PutValue(int indiv, int bit, char value)
public void InitialPopulation(int[][] sujeto, int tama, int[] tama_dom)
public void UniformMutation()
Uniform mutation operator
public void TwoPointsCrossover_operator(int indiv1, int indiv2, int i, int a)
Given the individuals "indiv1" and "indiv2", it selects two points exchanging their central zones. The resultant individuals are placed in the positions "i" and "a" of the population
indiv1
- int An individualindiv2
- int An individuali
- int A position in the populationa
- int A position in the populationpublic void AND_operator(int indiv1, int indiv2, int i)
Given the individuals "indiv1" and "indiv2", it selects two points and makes the AND operation between their central zones. The resultant individual are placed in the positions "i" of the population
indiv1
- int An individualindiv2
- int An individuali
- int A position in the populationpublic void OR_operator(int indiv1, int indiv2, int i)
Given the individuals "indiv1" and "indiv2", it selects two points and makes the OR operation between their central zones. The resultant individual are placed in the positions "i" of the population
indiv1
- int An individualindiv2
- int An individuali
- int A position in the populationpublic void Generalization_operator(int i)
public void Rotation(int i)
Given the individual "i", a rotation operation is made. The resultant individual are placed stay in position i. in the positions "i" of the population
i
- int An individualpublic int Mixed_Crossover(int indiv1, int indiv2, int i)
public void GenerationalCrossover()