BasicPopulation
org.encog.ml.ea.population

Class BasicPopulation

    • Constructor Detail

      • BasicPopulation

        public BasicPopulation()
        Construct an empty population.
      • BasicPopulation

        public BasicPopulation(int thePopulationSize,               GenomeFactory theGenomeFactory)
        Construct a population.
        Parameters:
        thePopulationSize - The population size.
    • Method Detail

      • clear

        public void clear()
        Clear all genomes from this population.
        Specified by:
        clear in interface Population
      • determineBestSpecies

        public Species determineBestSpecies()
        Determine which species has the top genome.
        Specified by:
        determineBestSpecies in interface Population
        Returns:
        The species with the top genome.
      • flatten

        public List<Genome> flatten()
        Flatten the species into a single list of genomes.
        Specified by:
        flatten in interface Population
        Returns:
        The genomes that make up all species in the population.
      • getMaxIndividualSize

        public int getMaxIndividualSize()
        Specified by:
        getMaxIndividualSize in interface Population
        Returns:
        The max size that an individual can become.
      • getName

        public String getName()
        Returns:
        The name.
      • getPopulationSize

        public int getPopulationSize()
        Specified by:
        getPopulationSize in interface Population
        Returns:
        The max population size.
      • setBestGenome

        public void setBestGenome(Genome genome)
        Set the best genome.
        Specified by:
        setBestGenome in interface Population
        Parameters:
        genome - The best genome.
      • setName

        public void setName(String theName)
        Set the name.
        Parameters:
        theName - The new name.
      • setPopulationSize

        public void setPopulationSize(int thePopulationSize)
        Set the max population size.
        Specified by:
        setPopulationSize in interface Population
        Parameters:
        thePopulationSize - The max population size.
      • size

        public int size()
        Specified by:
        size in interface Population
        Returns:
        The size of the population.

SCaVis 1.8 © jWork.org