public abstract class Individual
extends java.lang.Object
Individual abstract class for the different types of genetic individuals.
Modifier and Type | Field and Description |
---|---|
boolean |
evaluado
Evaluated flag.
|
QualityMeasures |
medidas
Measurements of the individual.
|
int |
tamano
Size of the individual.
|
Constructor and Description |
---|
Individual()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
evalInd(Genetic AG,
TableVar Variables,
TableDat Examples,
boolean marcar)
Evaluate a individual.
|
abstract int |
getCromElem(int pos)
Returns the indicated gene of the Chromosome
|
abstract int |
getCromElemGene(int pos,
int elem)
Retuns the value of the gene indicated
|
abstract CromCAN |
getIndivCromCAN()
Returns the Canonical Chromosome
|
abstract CromDNF |
getIndivCromDNF()
Returns the DNF Chromosome
|
boolean |
getIndivEvaluated()
Returns if the individual has been evaluated
|
float |
getIndivFitness()
Returns the fitness of the individual
|
QualityMeasures |
getMedidas()
Return the quality measure of the individual
|
int |
NumInterv(float valor,
int num_var,
TableVar Variables)
Returns the number of the interval of the indicated variable to which belongs
the value.
|
abstract void |
Print(java.lang.String nFile)
Method to print the contents of the individual
|
abstract void |
RndInitInd(TableVar Variables)
Creates rangom instance of DNF individual
|
abstract void |
setCromElem(int pos,
int val)
Sets the value of the indicated gene of the Chromosome
|
abstract void |
setCromElemGene(int pos,
int elem,
int val)
Sets the value of the indicated gene of the Chromosome
|
void |
setIndivEvaluated(boolean val)
Sets that the individual has been evaluated
|
void |
setIndivFitness(float cd)
Sets the Fitness of the individual
|
public int tamano
public boolean evaluado
public QualityMeasures medidas
public abstract void RndInitInd(TableVar Variables)
Creates rangom instance of DNF individual
Variables
- Variables structurepublic boolean getIndivEvaluated()
Returns if the individual has been evaluated
public void setIndivEvaluated(boolean val)
Sets that the individual has been evaluated
val
- Value of the state of the individualpublic float getIndivFitness()
Returns the fitness of the individual
public void setIndivFitness(float cd)
Sets the Fitness of the individual
cd
- Fitness for the individualpublic QualityMeasures getMedidas()
Return the quality measure of the individual
public abstract void setCromElem(int pos, int val)
Sets the value of the indicated gene of the Chromosome
pos
- Position of the variableval
- Value of the variablepublic abstract void setCromElemGene(int pos, int elem, int val)
Sets the value of the indicated gene of the Chromosome
pos
- Position of the variableelem
- Position of the geneval
- Value of the variablepublic abstract int getCromElem(int pos)
Returns the indicated gene of the Chromosome
pos
- Position of the genepublic abstract int getCromElemGene(int pos, int elem)
Retuns the value of the gene indicated
pos
- Position of the variable in the chromosomeelem
- Position of the gene of the variablepublic abstract CromDNF getIndivCromDNF()
Returns the DNF Chromosome
public abstract CromCAN getIndivCromCAN()
Returns the Canonical Chromosome
public abstract void evalInd(Genetic AG, TableVar Variables, TableDat Examples, boolean marcar)
Evaluate a individual. This function evaluates an individual.
AG
- Genetic algorithmVariables
- Variables structureExamples
- Examples structuremarcar
- Mark the individual.public int NumInterv(float valor, int num_var, TableVar Variables)
Returns the number of the interval of the indicated variable to which belongs the value. It is performed seeking the greater belonging degree of the value to the fuzzy sets defined for the variable
valor
- Value to calculatenum_var
- Number of the variableVariables
- Variables structurepublic abstract void Print(java.lang.String nFile)
Method to print the contents of the individual
nFile
- File to write the individual