public class Poblacion
extends java.lang.Object
Constructor and Description |
---|
Poblacion(int pop,
int bits)
It is the constructor of the class poblacion
|
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
Better(java.lang.Double p1,
java.lang.Double p2)
It compares 2 values which is better
|
void |
Cruce()
Function which cross the population
|
void |
Evaluate(int inicio,
int fin)
Function which evaluates the population
|
Cromosoma |
getBEST_CROM() |
double |
getBest() |
int |
getBITS_GEN() |
Ecm |
getE() |
Funciones |
getF() |
Gen[] |
getGene() |
int |
getGenes() |
int |
getnoCruce() |
int |
getNreglasTotal() |
Cromosoma[] |
getPoblacion() |
Cromosoma |
getPoblacion(int i) |
int |
getPopsize() |
int |
getPOPSIZE() |
double |
getReduccionIni() |
int[] |
getSample() |
double |
getTHRESHOLD() |
int |
getTrials() |
double |
getWorst() |
void |
Initialize(int tam1,
double[][] v1,
double[] s1,
int tam2,
double[][] v2,
double[] s2,
int n_variables,
int reglas,
int var,
double sal,
double[] v,
long semilla)
It initialize the population
|
void |
ReStart()
Function which restart the population
|
void |
Select()
Function which selects the elements of the population
|
void |
setBEST_CROM(Cromosoma best_crom) |
void |
setBest(double best) |
void |
setBITS_GEN(int bits_gen) |
void |
setE(Ecm e) |
void |
setF(Funciones f) |
void |
setGene(Gen[] gene) |
void |
setGenes(int genes) |
void |
setPoblacion(Cromosoma[] poblacion) |
void |
setPopsize(int popsize) |
void |
setPOPSIZE(int popsize) |
void |
setReduccionIni(double e) |
void |
setSample(int[] sample) |
void |
setTHRESHOLD(double threshold) |
void |
setTrials(int trials) |
void |
setWorst(double worst) |
public Poblacion(int pop, int bits)
pop
- it contains the size of populationbits
- it contains the number of bitspublic java.lang.Boolean Better(java.lang.Double p1, java.lang.Double p2)
p1
- one value to comparep2
- the other value to comparepublic void Initialize(int tam1, double[][] v1, double[] s1, int tam2, double[][] v2, double[] s2, int n_variables, int reglas, int var, double sal, double[] v, long semilla)
tam1
- It contains the size of the table of trainingv1
- It contains the training input valuess1
- It contains the training output valuestam2
- It contains the size of the table of testv2
- It contains the test input valuess2
- It contains the test output valuesn_variables
- It contains the number of variablesreglas
- It contains the number of rulesvar
- It contains the number of state variablessal
- It contains the exit valuev
- It contains the values of data basesemilla
- It contains the value of the seedpublic void ReStart()
public void Evaluate(int inicio, int fin)
inicio
- it contains the beginning of the evaluationfin
- it contains the end of the evaluationpublic void Select()
public void Cruce()
public int getTrials()
public void setTrials(int trials)
public double getTHRESHOLD()
public void setTHRESHOLD(double threshold)
public int getGenes()
public void setGenes(int genes)
public int getPopsize()
public void setPopsize(int popsize)
public int getPOPSIZE()
public void setPOPSIZE(int popsize)
public int getBITS_GEN()
public void setBITS_GEN(int bits_gen)
public Cromosoma getBEST_CROM()
public void setBEST_CROM(Cromosoma best_crom)
public Gen[] getGene()
public void setGene(Gen[] gene)
public Cromosoma[] getPoblacion()
public void setPoblacion(Cromosoma[] poblacion)
public double getBest()
public void setBest(double best)
public double getWorst()
public void setWorst(double worst)
public int[] getSample()
public void setSample(int[] sample)
public Funciones getF()
public void setF(Funciones f)
public Ecm getE()
public void setE(Ecm e)
public double getReduccionIni()
public void setReduccionIni(double e)
public Cromosoma getPoblacion(int i)
public int getNreglasTotal()
public int getnoCruce()