geneticWedge.gp
Class IndividualDescriptor

java.lang.Object
  extended by geneticWedge.gp.IndividualDescriptor

public class IndividualDescriptor
extends java.lang.Object

IndividualDescriptor holds the information required to create an Individual


Nested Class Summary
static class IndividualDescriptor.IndividualGrowMethod
          Determines whether an Individual is grown by the FULL or GROW method
 
Constructor Summary
IndividualDescriptor(IndividualDescriptor.IndividualGrowMethod growMethod, int maxTreeDepth, Function[] functions, Input[] inputs, Constant[] constants)
          Creates an IndividualDescriptor with all of the information needed to create a new Individual.
 
Method Summary
 Constant[] getConstants()
          Returns the array of Constants used by this descriptor
 Function[] getFunctions()
          Returns the array of Functions used by this descriptor
 double getGrowFunctionProportion()
          Returns the growFunctionProportion used by this descriptor.
 IndividualDescriptor.IndividualGrowMethod getGrowMethod()
          Returns the method that will be used to grow Individuals, i.e.
 Input[] getInputs()
          Returns the array of Inputs used by this descriptor
 int getMaxTreeDepth()
          Returns the maximum depth of trees grown using this descriptor.
 int getMinTreeDepth()
          Returns the minimum depth of trees grown using this descriptor.
 void setMaxTreeDepth(int newMaxDepth)
          Sets the maximum depth of trees grown using this descriptor.
 void setMinTreeDepth(int newMinDepth)
          Sets the minimum depth of trees grown using this descriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndividualDescriptor

public IndividualDescriptor(IndividualDescriptor.IndividualGrowMethod growMethod,
                            int maxTreeDepth,
                            Function[] functions,
                            Input[] inputs,
                            Constant[] constants)
Creates an IndividualDescriptor with all of the information needed to create a new Individual.

Method Detail

getGrowMethod

public IndividualDescriptor.IndividualGrowMethod getGrowMethod()
Returns the method that will be used to grow Individuals, i.e. GROW or FULL


setMaxTreeDepth

public void setMaxTreeDepth(int newMaxDepth)
Sets the maximum depth of trees grown using this descriptor.


getMaxTreeDepth

public int getMaxTreeDepth()
Returns the maximum depth of trees grown using this descriptor.


setMinTreeDepth

public void setMinTreeDepth(int newMinDepth)
Sets the minimum depth of trees grown using this descriptor.


getMinTreeDepth

public int getMinTreeDepth()
Returns the minimum depth of trees grown using this descriptor.


getFunctions

public Function[] getFunctions()
Returns the array of Functions used by this descriptor


getInputs

public Input[] getInputs()
Returns the array of Inputs used by this descriptor


getConstants

public Constant[] getConstants()
Returns the array of Constants used by this descriptor


getGrowFunctionProportion

public double getGrowFunctionProportion()
Returns the growFunctionProportion used by this descriptor. This is the probability that a Function (rather than a Terminal) will be selected while growing Individuals with the GROW method. The growFunctionProportion indirectly affects average tree size.