|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.ml.BasicML
org.encog.ml.ea.population.BasicPopulation
public class BasicPopulation
Defines the basic functionality for a population of genomes. The population is made up of species. These species contain the individiual genomes that make up the population. If you do not want to use species, then create one species that holds every genome.
| Constructor Summary | |
|---|---|
BasicPopulation()
Construct an empty population. |
|
BasicPopulation(int thePopulationSize,
GenomeFactory theGenomeFactory)
Construct a population. |
|
| Method Summary | |
|---|---|
void |
clear()
Clear all genomes from this population. |
Species |
createSpecies()
Create a species. |
Species |
determineBestSpecies()
Determine which species has the top genome. |
List<Genome> |
flatten()
Flatten the species into a single list of genomes. |
Genome |
getBestGenome()
|
GenomeFactory |
getGenomeFactory()
|
int |
getMaxIndividualSize()
|
String |
getName()
|
int |
getPopulationSize()
|
List<Species> |
getSpecies()
|
void |
purgeInvalidGenomes()
Purge any invalid genomes. |
void |
setBestGenome(Genome genome)
Set the best genome. |
void |
setGenomeFactory(GenomeFactory factory)
Set the gnome factory. |
void |
setName(String theName)
Set the name. |
void |
setPopulationSize(int thePopulationSize)
Set the max population size. |
int |
size()
|
void |
updateProperties()
Update any objeccts when a property changes. |
| Methods inherited from class org.encog.ml.BasicML |
|---|
getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicPopulation()
public BasicPopulation(int thePopulationSize,
GenomeFactory theGenomeFactory)
thePopulationSize - The population size.| Method Detail |
|---|
public void clear()
clear in interface Populationpublic Species createSpecies()
createSpecies in interface Populationpublic Species determineBestSpecies()
determineBestSpecies in interface Populationpublic List<Genome> flatten()
flatten in interface Populationpublic Genome getBestGenome()
getBestGenome in interface Populationpublic GenomeFactory getGenomeFactory()
getGenomeFactory in interface Populationpublic int getMaxIndividualSize()
getMaxIndividualSize in interface Populationpublic String getName()
public int getPopulationSize()
getPopulationSize in interface Populationpublic List<Species> getSpecies()
getSpecies in interface Populationpublic void setBestGenome(Genome genome)
setBestGenome in interface Populationgenome - The best genome.public void setGenomeFactory(GenomeFactory factory)
setGenomeFactory in interface Populationfactory - The genome factory.public void setName(String theName)
theName - The new name.public void setPopulationSize(int thePopulationSize)
setPopulationSize in interface PopulationthePopulationSize - The max population size.public int size()
size in interface Populationpublic void updateProperties()
updateProperties in interface MLPropertiesupdateProperties in class BasicMLpublic void purgeInvalidGenomes()
purgeInvalidGenomes in interface Population
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||