ec.gp
Class GPSpecies

java.lang.Object
  |
  +--ec.Species
        |
        +--ec.gp.GPSpecies

public class GPSpecies
extends Species
implements GPSpeciesForm

GPSpecies is a simple individual which is suitable as a species for GP subpopulations. GPSpecies' individuals must be GPIndividuals, and often their pipelines are GPBreedingPipelines (at any rate, the pipelines will have to return members of GPSpecies!).

Default Base
gp.species

See Also:
Serialized Form

Field Summary
static java.lang.String P_GPSPECIES
           
 
Fields inherited from class ec.Species
i_prototype, P_INDIVIDUAL, P_PIPE, pipe_prototype
 
Constructor Summary
GPSpecies()
           
 
Method Summary
 Parameter defaultBase()
          Returns the default base for this prototype.
 Individual newIndividual(EvolutionState state, Subpopulation _population, Fitness _fitness)
          override this to provide a brand-new individual to fill in a population.
 Individual newIndividual(EvolutionState state, Subpopulation _population, Fitness _fitness, int thread, java.io.LineNumberReader reader)
          override this to provide an individual read from a file; the individual will appear as it was written by printIndividual(...).
 void setup(EvolutionState state, Parameter base)
          Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.
 
Methods inherited from class ec.Species
protoClone, protoCloneSimple
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

P_GPSPECIES

public static final java.lang.String P_GPSPECIES
Constructor Detail

GPSpecies

public GPSpecies()
Method Detail

defaultBase

public Parameter defaultBase()
Description copied from interface: Prototype
Returns the default base for this prototype. This should generally be implemented by building off of the static base() method on the DefaultsForm object for the prototype's package. This should be callable during setup(...).

setup

public void setup(EvolutionState state,
                  Parameter base)
Description copied from interface: Prototype
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.

For prototypes, setup(...) is typically called once for the prototype instance; cloned instances do not receive the setup(...) call. setup(...) may be called more than once; the only guarantee is that it will get called at least once on an instance or some "parent" object from which it was ultimately cloned.

Overrides:
setup in class Species

newIndividual

public Individual newIndividual(EvolutionState state,
                                Subpopulation _population,
                                Fitness _fitness)
                         throws java.lang.CloneNotSupportedException
Description copied from class: Species
override this to provide a brand-new individual to fill in a population. The CloneNotSupportedException permits you to use protoClone() rather than protoCloneSimple(), for efficiency gains.
Overrides:
newIndividual in class Species

newIndividual

public Individual newIndividual(EvolutionState state,
                                Subpopulation _population,
                                Fitness _fitness,
                                int thread,
                                java.io.LineNumberReader reader)
                         throws java.io.IOException,
                                java.lang.CloneNotSupportedException
Description copied from class: Species
override this to provide an individual read from a file; the individual will appear as it was written by printIndividual(...). You should read and set up the fitness as well. Don't close the file.
Overrides:
newIndividual in class Species