org.omegahat.Numerics.GeneticAlgorithms
Interface Population

All Superinterfaces:
java.util.Collection, java.util.Set, java.util.SortedSet
All Known Implementing Classes:
PopulationOrdered

public interface Population
extends java.util.SortedSet

An interface to represent a collection of individuals.

Implementing classes may be oriented towards an array-like or linked-list-like approach depending on the approach to be taken to the breeding, mutation, and survival operations. The interface just requires a way to enumerate the individuals.

A population needs some notion of ``fitness'' in the sense of distinguishing individuals' breeding and/or survival potential, in order to have the population evolve meaningfully to ``better'' choices of individuals. This may be via a function that computes fitness for any individual, but could be done by a comparative fitness capability instead.


Method Summary
 void addEvolutionListener(EvolutionListener listener)
          Add a listener for evolution events.
 void notifyEvolutionListeners(EvolutionEvent event)
          Notify all the listeners of an evolution event.
 void removeEvolutionListener(EvolutionListener listener)
          Drop a listener for evolution events.
 
Methods inherited from interface java.util.SortedSet
comparator, first, headSet, last, subSet, tailSet
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

addEvolutionListener

public void addEvolutionListener(EvolutionListener listener)
Add a listener for evolution events.

removeEvolutionListener

public void removeEvolutionListener(EvolutionListener listener)
Drop a listener for evolution events.

notifyEvolutionListeners

public void notifyEvolutionListeners(EvolutionEvent event)
Notify all the listeners of an evolution event.