Class StatusBar

    • Constructor Detail

      • StatusBar

        public StatusBar()
        Creates a status bar configured for non-island evolution.
      • StatusBar

        public StatusBar​(boolean islands)
        Parameters:
        islands - Whether the status bar should be configured for updates from IslandEvolution. Set this parameter to false when using a standard EvolutionEngine
    • Method Detail

      • populationUpdate

        public void populationUpdate​(PopulationData<?> populationData)
        Invoked when the state of the population has changed (typically at the end of a generation).
        Specified by:
        populationUpdate in interface EvolutionObserver<Object>
        Parameters:
        populationData - Statistics about the state of the current generation.
      • islandPopulationUpdate

        public void islandPopulationUpdate​(int islandIndex,
                                           PopulationData<? extends Object> populationData)
        Method called to notify the listener of the state of the population of an individual island. This will be called once for each generation on each island.
        Specified by:
        islandPopulationUpdate in interface IslandEvolutionObserver<Object>
        Parameters:
        islandIndex - Identifies which individual island the data comes from. Indices start at zero and are sequential.
        populationData - The latest data from the evolution on the specified island.