Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKBJavaConnector/ECJClient/src/ec/gp/build/PTCFunctionSetForm.java @ 11194

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

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

File size: 1.7 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.gp.build;
9
10/*
11 * PTCFunctionSetForm.java
12 *
13 * Created: Mon Oct 16 17:21:44 2000
14 * By: Sean Luke
15 */
16
17/**
18 * PTCFunctionSetForm defines the methods that the PTC1 and PTC2 tree-creation
19 * algorithms require of function sets.  Your GPFunctionSet must adhere to
20 * this form in order to be used by these algorithms; the PTCFunctionSet
21 * class is provided to simplify matters for you (it's a direct subclass of
22 * GPFunctionSet which adheres to this form).
23 *
24 * @author Sean Luke
25 * @version 1.0
26 */
27
28public interface PTCFunctionSetForm 
29    {
30    /** Returns an organized distribution (see ec.util.RandomChoice) of likelihoods
31        that various terminals in the function set will be chosen over other terminals
32        with the same return type.  The ordering of the array is the same as
33        the terminals[type][...] array in GPFunctionSet.  */
34    public float[] terminalProbabilities(final int type);
35
36    /** Returns an organized distribution (see ec.util.RandomChoice) of likelihoods
37        that various nonterminals in the function set will be chosen over other nonterminals
38        with the same return type. The ordering of the array is the same as
39        the nonterminals[type][...] array in GPFunctionSet. */
40    public float[] nonterminalProbabilities(final int type);
41   
42    /** Returns an array (by return type) of the probability that PTC1 must pick a
43        nonterminal over a terminal in order to guarantee the expectedTreeSize.
44        Only used by PTC1, not by PTC2. */
45    public float[] nonterminalSelectionProbabilities(final int expectedTreeSize);
46    }
Note: See TracBrowser for help on using the repository browser.