org.dishevelled.evolve
Class EvolutionaryAlgorithmEvent<I>

java.lang.Object
  extended by java.util.EventObject
      extended by org.dishevelled.evolve.EvolutionaryAlgorithmEvent<I>
Type Parameters:
I - individual type
All Implemented Interfaces:
Serializable

public final class EvolutionaryAlgorithmEvent<I>
extends EventObject

An event representing progress in an evolutionary algorithm function.

Version:
$Revision: 1059 $ $Date: 2012-01-03 14:03:02 -0600 (Tue, 03 Jan 2012) $
Author:
Michael Heuer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
EvolutionaryAlgorithmEvent(EvolutionaryAlgorithm<I> source, Collection<I> population, Collection<I> recombined, Collection<I> mutated)
          Create a new evolutionary algorithm event with the specified parameters.
EvolutionaryAlgorithmEvent(EvolutionaryAlgorithm<I> source, Collection<I> population, Collection<I> selected, WeightedMap<I> scores)
          Create a new evolutionary algorithm event with the specified parameters.
EvolutionaryAlgorithmEvent(EvolutionaryAlgorithm<I> source, Collection<I> population, WeightedMap<I> scores, int time)
          Create a new evolutionary algorithm event with the specified parameters.
EvolutionaryAlgorithmEvent(EvolutionaryAlgorithm<I> source, I individual, Double score)
          Create a new evolutionary algorithm event with the specified parameters.
 
Method Summary
 EvolutionaryAlgorithm<I> getEvolutionaryAlgorithm()
          Return the source of this event as an evolutionary algorithm function.
 I getIndividual()
          Return the individual, for fitness calculated events.
 Collection<I> getMutated()
          Return the collection of mutated individuals, for mutated events.
 Collection<I> getPopulation()
          Return the population of individuals.
 Collection<I> getRecombined()
          Return the collection of recombined individuals, for recombined or mutated events.
 Double getScore()
          Return the score, for fitness calculated events.
 WeightedMap<I> getScores()
          Return the fitness scores.
 Collection<I> getSelected()
          Return the collection of selected individuals, for selected events.
 int getTime()
          Return the time (in number of generations), for exit events.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EvolutionaryAlgorithmEvent

public EvolutionaryAlgorithmEvent(EvolutionaryAlgorithm<I> source,
                                  Collection<I> population,
                                  WeightedMap<I> scores,
                                  int time)
Create a new evolutionary algorithm event with the specified parameters.

Parameters:
source - source of this event
population - population of individuals, for exit events
scores - fitness scores, for exit events
time - time (in number of generations), for exit events

EvolutionaryAlgorithmEvent

public EvolutionaryAlgorithmEvent(EvolutionaryAlgorithm<I> source,
                                  Collection<I> population,
                                  Collection<I> recombined,
                                  Collection<I> mutated)
Create a new evolutionary algorithm event with the specified parameters.

Parameters:
source - source of this event
population - population of individuals, for recombined events
recombined - collection of recombined individuals, for recombined or mutated events
mutated - collection of mutated individuals, for mutated events

EvolutionaryAlgorithmEvent

public EvolutionaryAlgorithmEvent(EvolutionaryAlgorithm<I> source,
                                  I individual,
                                  Double score)
Create a new evolutionary algorithm event with the specified parameters.

Parameters:
source - source of this event
individual - individual, for fitness calculated events
score - score, for fitness calculated events

EvolutionaryAlgorithmEvent

public EvolutionaryAlgorithmEvent(EvolutionaryAlgorithm<I> source,
                                  Collection<I> population,
                                  Collection<I> selected,
                                  WeightedMap<I> scores)
Create a new evolutionary algorithm event with the specified parameters.

Parameters:
source - source of this event
population - population of individuals, for selected events
selected - collection of selected individuals, for selected events
scores - fitness scores, for selected events
Method Detail

getEvolutionaryAlgorithm

public EvolutionaryAlgorithm<I> getEvolutionaryAlgorithm()
Return the source of this event as an evolutionary algorithm function.

Returns:
the source of this event as an evolutionary algorithm function

getPopulation

public Collection<I> getPopulation()
Return the population of individuals. May be null.

Returns:
the population of individuals

getScores

public WeightedMap<I> getScores()
Return the fitness scores. May be null.

Returns:
the fitness scores

getTime

public int getTime()
Return the time (in number of generations), for exit events. Defaults to 0.

Returns:
the time (in number of generations), for exit events

getRecombined

public Collection<I> getRecombined()
Return the collection of recombined individuals, for recombined or mutated events. May be null.

Returns:
the collection of recombined individuals, for recombined or mutated events

getMutated

public Collection<I> getMutated()
Return the collection of mutated individuals, for mutated events. May be null.

Returns:
the collection of mutated individuals, for mutated events

getIndividual

public I getIndividual()
Return the individual, for fitness calculated events. May be null.

Returns:
the individual, for fitness calculated events

getScore

public Double getScore()
Return the score, for fitness calculated events. May be null.

Returns:
the score, for fitness calculated events

getSelected

public Collection<I> getSelected()
Return the collection of selected individuals, for selected events. May be null.

Returns:
the collection of selected individuals, for selected events


Copyright (c) 2005-2012 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).