|
||||||||||
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 Population
public Species createSpecies()
createSpecies
in interface Population
public Species determineBestSpecies()
determineBestSpecies
in interface Population
public List<Genome> flatten()
flatten
in interface Population
public Genome getBestGenome()
getBestGenome
in interface Population
public GenomeFactory getGenomeFactory()
getGenomeFactory
in interface Population
public int getMaxIndividualSize()
getMaxIndividualSize
in interface Population
public String getName()
public int getPopulationSize()
getPopulationSize
in interface Population
public List<Species> getSpecies()
getSpecies
in interface Population
public void setBestGenome(Genome genome)
setBestGenome
in interface Population
genome
- The best genome.public void setGenomeFactory(GenomeFactory factory)
setGenomeFactory
in interface Population
factory
- The genome factory.public void setName(String theName)
theName
- The new name.public void setPopulationSize(int thePopulationSize)
setPopulationSize
in interface Population
thePopulationSize
- The max population size.public int size()
size
in interface Population
public void updateProperties()
updateProperties
in interface MLProperties
updateProperties
in class BasicML
public void purgeInvalidGenomes()
purgeInvalidGenomes
in interface Population
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |