public class IndDNF extends Individual
Defines the DNF individual of the population
Modifier and Type | Field and Description |
---|---|
CromDNF |
cromosoma
Individual contents (DNF chromosome).
|
crowdingDistance, cubr, cubre, evaluado, medidas, n_eval, numberOfViolatedConstraints, overallConstraintViolation, rank, tamano
Constructor and Description |
---|
IndDNF(int lenght,
int neje,
int nobj,
TableVar Variables)
Creates new instance of Individual
|
Modifier and Type | Method and Description |
---|---|
void |
BsdInitInd(TableVar Variables,
float porcVar,
int neje,
java.lang.String nFile)
Creates biased instance of DNF individual
|
void |
CobInitInd(Population pop,
TableVar Variables,
TableDat Examples,
float porcCob,
int nobj,
java.lang.String nFile)
Creates nstance of DNF individual based on coverage
|
void |
copyIndiv(Individual a,
int neje,
int nobj)
Copy the indicaded individual in "this" individual
|
void |
evalInd(Genetic AG,
TableVar Variables,
TableDat Examples)
Evaluate a individual.
|
int |
getCromElem(int pos)
Returns the indicated gene of the Chromosome
|
boolean |
getCromGeneElem(int pos,
int elem)
Returns the indicated gene of the Chromosome
|
CromDNF |
getIndivCrom()
Returns the Chromosome
|
CromCAN |
getIndivCromCAN()
Returns the indicated Chromosome
|
CromDNF |
getIndivCromDNF()
Returns the indicated Chromosome
|
int |
NumInterv(float valor,
int num_var,
TableVar Variables)
Returns the number of the interval of the indicated variable to which belongs
the value.
|
void |
Print(java.lang.String nFile)
Method to Print the contents of the individual
|
void |
RndInitInd(TableVar Variables,
int neje,
java.lang.String nFile)
Creates rangom instance of DNF individual
|
void |
setCromElem(int pos,
int val)
Sets the value of the indicated gene of the Chromosome
|
void |
setCromGeneElem(int pos,
int elem,
boolean val)
Sets the value of the indicated gene of the Chromosome
|
getCnfValue, getCrowdingDistance, getIndivCovered, getIndivEvaluated, getMeasures, getMeasureValue, getNEval, getNumberViolatedConstraints, getOverallConstraintViolation, getRank, setCnfValue, setCrowdingDistance, setIndivEvaluated, setMeasureValue, setNEval, setNumberViolatedConstraints, setOverallConstraintViolation, setRank
public CromDNF cromosoma
Individual contents (DNF chromosome).
public IndDNF(int lenght, int neje, int nobj, TableVar Variables)
Creates new instance of Individual
lenght
- Lenght of the individualneje
- Number of examplesnobj
- Number of objectivesVariables
- Variables structurepublic void RndInitInd(TableVar Variables, int neje, java.lang.String nFile)
Creates rangom instance of DNF individual
RndInitInd
in class Individual
Variables
- Variables structureneje
- Number of exaplesnFile
- Fichero to write the individualpublic void BsdInitInd(TableVar Variables, float porcVar, int neje, java.lang.String nFile)
Creates biased instance of DNF individual
BsdInitInd
in class Individual
Variables
- Variables structureporcVar
- Percentage of variables to form the individualneje
- Number of exaplesnFile
- Fichero to write the individualpublic void CobInitInd(Population pop, TableVar Variables, TableDat Examples, float porcCob, int nobj, java.lang.String nFile)
Creates nstance of DNF individual based on coverage
CobInitInd
in class Individual
pop
- Actual populationVariables
- Variables structureExamples
- Examples structureporcCob
- Percentage of variables to form the individualnobj
- Number of objectivesnFile
- Fichero to write the individualpublic CromDNF getIndivCrom()
Returns the Chromosome
public boolean getCromGeneElem(int pos, int elem)
Returns the indicated gene of the Chromosome
getCromGeneElem
in class Individual
pos
- Position of the variableelem
- Position of the genepublic int getCromElem(int pos)
Returns the indicated gene of the Chromosome
getCromElem
in class Individual
pos
- Position of the genepublic void setCromGeneElem(int pos, int elem, boolean val)
Sets the value of the indicated gene of the Chromosome
setCromGeneElem
in class Individual
pos
- Position of the variableelem
- Position of the geneval
- Value of the variablepublic void setCromElem(int pos, int val)
Sets the value of the indicated gene of the Chromosome
setCromElem
in class Individual
pos
- Position of the variableval
- Value of the variablepublic CromDNF getIndivCromDNF()
Returns the indicated Chromosome
getIndivCromDNF
in class Individual
public CromCAN getIndivCromCAN()
Returns the indicated Chromosome
getIndivCromCAN
in class Individual
public void copyIndiv(Individual a, int neje, int nobj)
Copy the indicaded individual in "this" individual
copyIndiv
in class Individual
a
- The individual to Copyneje
- Number of examplesnobj
- Number of objectivespublic void evalInd(Genetic AG, TableVar Variables, TableDat Examples)
Evaluate a individual. This function evaluates an individual.
evalInd
in class Individual
AG
- Genetic algorithmVariables
- Variables structureExamples
- Examples structurepublic 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
NumInterv
in class Individual
valor
- Value to calculatenum_var
- Number of the variableVariables
- Variables structurepublic void Print(java.lang.String nFile)
Method to Print the contents of the individual
Print
in class Individual
nFile
- Fichero to write the individual