Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKBJavaConnector/ECJClient/src/ec/simple/SimpleExchanger.java @ 6152

Last change on this file since 6152 was 6152, checked in by bfarka, 13 years ago

added ecj and custom statistics to communicate with the okb services #1441

File size: 2.0 KB
Line 
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
8package ec.simple;
9import ec.EvolutionState;
10import ec.Population;
11import ec.Exchanger;
12import ec.util.Parameter;
13import ec.steadystate.*;
14
15/*
16 * SimpleExchanger.java
17 *
18 * Created: Tue Aug 10 21:59:17 1999
19 * By: Sean Luke
20 */
21
22/**
23 * A SimpleExchanger is a default Exchanger which, well, doesn't do anything.
24 * Most applications don't need Exchanger facilities; this simple version
25 * will suffice.
26 *
27 * <p>The SimpleExchanger implements the SteadyStateExchangerForm, mostly
28 * because it does nothing with individuals.  For this reason, it is final;
29 * implement your own Exchanger if you need to do something more advanced.
30 *
31 * @author Sean Luke
32 * @version 1.0
33 */
34
35public final class SimpleExchanger extends Exchanger implements SteadyStateExchangerForm
36    {
37    public void setup(final EvolutionState state, final Parameter base) { }
38
39    /** Doesn't do anything. */
40    public void initializeContacts(final EvolutionState state)
41        {
42        // don't care
43        return;
44        }
45
46    /** Doesn't do anything. */
47    public void reinitializeContacts(final EvolutionState state)
48        {
49        // don't care
50        return;
51        }
52
53    /** Simply returns state.population. */
54    public Population preBreedingExchangePopulation(final EvolutionState state)
55        {
56        // don't care
57        return state.population;
58        }
59
60    /** Simply returns state.population. */
61    public Population postBreedingExchangePopulation(final EvolutionState state)
62        {
63        // don't care
64        return state.population;
65        }
66
67    /** Doesn't do anything. */
68    public void closeContacts(final EvolutionState state, final int result)
69        {
70        // don't care
71        return;
72        }
73
74    /** Always returns null */
75    public String runComplete(final EvolutionState state)
76        {
77        return null;
78        }
79
80    }
Note: See TracBrowser for help on using the repository browser.