public class IndCAN extends Individual
Defines an individual composed by a Canonical cromosome.
Modifier and Type | Field and Description |
---|---|
CromCAN |
cromosoma
Individual contents (Canonical chromosome).
|
evaluado, medidas, tamano
Constructor and Description |
---|
IndCAN(int length)
Creates new instance of IndCAN
|
Modifier and Type | Method and Description |
---|---|
void |
evalInd(Genetic AG,
TableVar Variables,
TableDat Examples,
boolean marcar)
Evaluate a individual.
|
int |
getCromElem(int pos)
Returns the indicated gene of the Chromosome
|
int |
getCromElemGene(int pos,
int elem)
Returns the value of the indicated gene for the variable
|
CromCAN |
getIndivCromCAN()
Returns the Chromosome
|
CromDNF |
getIndivCromDNF()
Returns the Chromosome
|
void |
Print(java.lang.String nFile)
Method to print the contents of the individual
|
void |
RndInitInd(TableVar Variables)
Creates random instance of Canonical individual
|
void |
setCromElem(int pos,
int val)
Sets the value of the indicated gene of the Chromosome
|
void |
setCromElemGene(int pos,
int elem,
int val)
Sets the value of the indicated gene of the Chromosome
|
getIndivEvaluated, getIndivFitness, getMedidas, NumInterv, setIndivEvaluated, setIndivFitness
public CromCAN cromosoma
Individual contents (Canonical chromosome).
public IndCAN(int length)
Creates new instance of IndCAN
length
- Length of the chromosomepublic void RndInitInd(TableVar Variables)
Creates random instance of Canonical individual
RndInitInd
in class Individual
Variables
- Variables structurepublic CromCAN getIndivCromCAN()
Returns the Chromosome
getIndivCromCAN
in class Individual
public CromDNF getIndivCromDNF()
Returns the Chromosome
getIndivCromDNF
in class Individual
public int getCromElem(int pos)
Returns the indicated gene of the Chromosome
getCromElem
in class Individual
pos
- Position of the genepublic int getCromElemGene(int pos, int elem)
Returns the value of the indicated gene for the variable
getCromElemGene
in class Individual
pos
- Position of the variableelem
- Position of the genepublic 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 void setCromElemGene(int pos, int elem, int val)
Sets the value of the indicated gene of the Chromosome
setCromElemGene
in class Individual
pos
- Position of the variableelem
- Position of the geneval
- Value of the variablepublic void evalInd(Genetic AG, TableVar Variables, TableDat Examples, boolean marcar)
Evaluate a individual. This function evaluates an individual.
evalInd
in class Individual
AG
- Genetic algorithmVariables
- Variables structureExamples
- Ejemplos structuremarcar
- Indicates to mark the covered examplespublic void Print(java.lang.String nFile)
Method to print the contents of the individual
Print
in class Individual
nFile
- File to write the individual