1 | /* |
---|
2 | Copyright 2006 by Sean Luke |
---|
3 | Licensed under the Academic Free License version 3.0 |
---|
4 | See the file "LICENSE" for more information |
---|
5 | */ |
---|
6 | |
---|
7 | |
---|
8 | package ec.steadystate; |
---|
9 | import ec.*; |
---|
10 | |
---|
11 | /* |
---|
12 | * SteadyStateStatisticsForm.java |
---|
13 | * |
---|
14 | * Created: Fri Nov 9 20:45:26 EST 2001 |
---|
15 | * By: Sean Luke |
---|
16 | */ |
---|
17 | |
---|
18 | /** |
---|
19 | * This interface defines the hooks for SteadyStateEvolutionState objects |
---|
20 | * to update themselves on. Note that the the only methods in common |
---|
21 | * with the standard statistics are initialization and final. This is an |
---|
22 | * optional interface: SteadyStateEvolutionState will complain, but |
---|
23 | * will permit Statistics objects that don't adhere to it, though they will |
---|
24 | * only have their initialization and final statistics methods called! |
---|
25 | * |
---|
26 | * <p>See SteadyStateEvolutionState for how regular Statistics objects' |
---|
27 | * hook methods are called in steady state evolution. |
---|
28 | * |
---|
29 | * @author Sean Luke |
---|
30 | * @version 1.0 |
---|
31 | */ |
---|
32 | |
---|
33 | public interface SteadyStateStatisticsForm |
---|
34 | { |
---|
35 | /** Called when we created an empty initial Population. */ |
---|
36 | public void enteringInitialPopulationStatistics(SteadyStateEvolutionState state); |
---|
37 | /** Called when we have filled the initial population and are entering the steady state. */ |
---|
38 | public void enteringSteadyStateStatistics(int subpop, SteadyStateEvolutionState state); |
---|
39 | /** Called each time new individuals are bred during the steady-state |
---|
40 | process. */ |
---|
41 | public void individualsBredStatistics(SteadyStateEvolutionState state, Individual[] individuals); |
---|
42 | /** Called each time new individuals are evaluated during the steady-state |
---|
43 | process, NOT including the initial generation's individuals. */ |
---|
44 | public void individualsEvaluatedStatistics(SteadyStateEvolutionState state, Individual[] newIndividuals, |
---|
45 | Individual[] oldIndividuals, int[] subpopulations, int[] indices); |
---|
46 | /** Called when the generation count increments */ |
---|
47 | public void generationBoundaryStatistics(final EvolutionState state); |
---|
48 | /** Called immediately before checkpointing occurs. */ |
---|
49 | public void preCheckpointStatistics(final EvolutionState state); |
---|
50 | /** Called immediately after checkpointing occurs. */ |
---|
51 | public void postCheckpointStatistics(final EvolutionState state); |
---|
52 | /** Called immediately before the pre-breeding exchange occurs. */ |
---|
53 | public void prePreBreedingExchangeStatistics(final EvolutionState state); |
---|
54 | /** Called immediately after the pre-breeding exchange occurs. */ |
---|
55 | public void postPreBreedingExchangeStatistics(final EvolutionState state); |
---|
56 | /** Called immediately before the post-breeding exchange occurs. */ |
---|
57 | public void prePostBreedingExchangeStatistics(final EvolutionState state); |
---|
58 | /** Called immediately after the post-breeding exchange occurs. */ |
---|
59 | public void postPostBreedingExchangeStatistics(final EvolutionState state); |
---|
60 | /** Called immediately after the run has completed. <i>result</i> |
---|
61 | is either <tt>state.R_FAILURE</tt>, indicating that an ideal individual |
---|
62 | was not found, or <tt>state.R_SUCCESS</tt>, indicating that an ideal |
---|
63 | individual <i>was</i> found. */ |
---|
64 | public void finalStatistics(final EvolutionState state, final int result); |
---|
65 | } |
---|