Modifier and Type | Field and Description |
---|---|
double |
crowdingDistance
Crowding Distance.
|
float |
cubr
Cover percentage.
|
boolean[] |
cubre
Stores if the invididual covers each example.
|
boolean |
evaluado
Evaluated flag.
|
QualityMeasures |
medidas
Measurements of the individual.
|
int |
n_eval
Number of evalutations.
|
int |
numberOfViolatedConstraints
Number of Violated Constraints.
|
double |
overallConstraintViolation
Overall Constraint Violation percentage.
|
int |
rank
Rank.
|
int |
tamano
Size of the individual.
|
Constructor and Description |
---|
Individual()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
BsdInitInd(TableVar Variables,
float porcVar,
int neje,
java.lang.String nFile)
Creates biased instance of individual
|
abstract void |
CobInitInd(Population pop,
TableVar Variables,
TableDat Examples,
float porcCob,
int nobj,
java.lang.String nFile)
Creates nstance of individual based on coverage
|
abstract void |
copyIndiv(Individual indi,
int nobj,
int neje)
Copies an individual given.
|
abstract void |
evalInd(Genetic AG,
TableVar Variables,
TableDat Examples)
Evaluate a individual.
|
double |
getCnfValue()
Gets the value of confidence of the individual
|
abstract int |
getCromElem(int pos)
Returns the indicated gene of the Chromosome
|
abstract boolean |
getCromGeneElem(int pos,
int elem)
Retuns the value of the gene indicated
|
double |
getCrowdingDistance()
Returns the crowdingDistance of the individual
|
boolean |
getIndivCovered(int pos)
Returns the position i of the array cubre
|
abstract CromCAN |
getIndivCromCAN()
Returns the Canonical Chromosome
|
abstract CromDNF |
getIndivCromDNF()
Returns the DNF Chromosome
|
boolean |
getIndivEvaluated()
Returns if the individual has been evaluated
|
QualityMeasures |
getMeasures()
Return the quality measure of the individual
|
double |
getMeasureValue(int pos)
Gets the value of the quality measure in the position pos
|
int |
getNEval()
Returns the number of evaluation when the individual was created
|
int |
getNumberViolatedConstraints()
Returns the numberOfViolatedConstraints of the individual
|
double |
getOverallConstraintViolation()
Returns the overallConstraintViolation of the individual
|
int |
getRank()
Returns the rank of the individual
|
abstract 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,
int neje,
java.lang.String nFile)
Creates random instance of individual
|
void |
setCnfValue(double value)
Sets the value of confidence of the individual
|
abstract void |
setCromElem(int pos,
int val)
Sets a value in a given position in the chromosome.
|
abstract void |
setCromGeneElem(int pos,
int elem,
boolean val)
Sets the value of the indicated gene of the Chromosome
|
void |
setCrowdingDistance(double cd)
Sets the crowdingDistance of the individual
|
void |
setIndivEvaluated(boolean val)
Sets that the individual has been evaluated
|
void |
setMeasureValue(int pos,
double value)
Sets the value of the quality measure in the position pos
|
void |
setNEval(int eval)
Sets the number of evaluation when the individual was created
|
void |
setNumberViolatedConstraints(int novc)
Sets the numberOfViolatedConstraints of the individual
|
void |
setOverallConstraintViolation(double ocv)
Sets the overallConstraintViolation of the individual
|
void |
setRank(int arank)
Sets the rank of the individual
|
public int tamano
public boolean evaluado
public boolean[] cubre
public int rank
public double overallConstraintViolation
public int numberOfViolatedConstraints
public double crowdingDistance
public float cubr
public int n_eval
public QualityMeasures medidas
public abstract void RndInitInd(TableVar Variables, int neje, java.lang.String nFile)
Creates random instance of individual
Variables
- Variables structureneje
- Number of exaplesnFile
- Fichero to write the individualpublic abstract void BsdInitInd(TableVar Variables, float porcVar, int neje, java.lang.String nFile)
Creates biased instance of individual
Variables
- Variables structureporcVar
- Percentage of variables to form the individualneje
- Number of exaplesnFile
- Fichero to write the individualpublic abstract void CobInitInd(Population pop, TableVar Variables, TableDat Examples, float porcCob, int nobj, java.lang.String nFile)
Creates nstance of individual based on coverage
pop
- Actual populationVariables
- Variables structureExamples
- Examples structureporcCob
- Percentage of variables to form the individualnobj
- Number of objectivesnFile
- Fichero to write the individualpublic boolean getIndivCovered(int pos)
Returns the position i of the array cubre
pos
- Position of examplepublic 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 double getCrowdingDistance()
Returns the crowdingDistance of the individual
public void setCrowdingDistance(double cd)
Sets the crowdingDistance of the individual
cd
- Crowding distance for the individualpublic int getNumberViolatedConstraints()
Returns the numberOfViolatedConstraints of the individual
public void setNumberViolatedConstraints(int novc)
Sets the numberOfViolatedConstraints of the individual
novc
- Number of constraints violatedpublic double getOverallConstraintViolation()
Returns the overallConstraintViolation of the individual
public void setOverallConstraintViolation(double ocv)
Sets the overallConstraintViolation of the individual
ocv
- Number over all constraints violatedpublic int getRank()
Returns the rank of the individual
public void setRank(int arank)
Sets the rank of the individual
arank
- Ranking of the individualpublic int getNEval()
Returns the number of evaluation when the individual was created
public void setNEval(int eval)
Sets the number of evaluation when the individual was created
eval
- Number of evaluation when the individual was createdpublic QualityMeasures getMeasures()
Return the quality measure of the individual
public double getMeasureValue(int pos)
Gets the value of the quality measure in the position pos
pos
- Position of the quality measurepublic void setMeasureValue(int pos, double value)
Sets the value of the quality measure in the position pos
pos
- Position of the quality measurevalue
- Value of the quality measurepublic void setCnfValue(double value)
Sets the value of confidence of the individual
value
- Value of confidence of the individualpublic double getCnfValue()
Gets the value of confidence of the individual
public abstract int getCromElem(int pos)
Returns the indicated gene of the Chromosome
pos
- Position of the genepublic abstract void setCromElem(int pos, int val)
pos
- given position.val
- given value.public abstract boolean getCromGeneElem(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 void setCromGeneElem(int pos, int elem, boolean 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 CromCAN getIndivCromCAN()
Returns the Canonical Chromosome
public abstract CromDNF getIndivCromDNF()
Returns the DNF Chromosome
public abstract void copyIndiv(Individual indi, int nobj, int neje)
indi
- given individual to be copied.nobj
- object number.neje
- examples number.public abstract void evalInd(Genetic AG, TableVar Variables, TableDat Examples)
Evaluate a individual. This function evaluates an individual.
AG
- Genetic algorithmVariables
- Variables structureExamples
- Ejemplos structurepublic abstract 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