gpalta.core
Class SingleTreePopulation

java.lang.Object
  extended by gpalta.core.SingleTreePopulation
All Implemented Interfaces:
Population, java.io.Serializable

public class SingleTreePopulation
extends java.lang.Object
implements Population, java.io.Serializable

Implements the most common population type on GP: a fixed number of trees, each interpreded separatedly

See Also:
Serialized Form

Constructor Summary
SingleTreePopulation()
           
 
Method Summary
 void doSelection(IndSelector sel)
           
 void eval(Fitness f, TempOutputFactory tempOutputFactory, DataHolder data)
           
 void evolve(TreeOperator op)
           
 Individual get(int which)
          Get a certain individual
 Output getProcessedOutput(Individual ind, Fitness f, TempOutputFactory tempOutputFactory, DataHolder data)
           
 Output getRawOutput(Individual ind, TempOutputFactory tempOutputFactory, DataHolder data)
          Get the output directly from the Individual, without further processing
 void init(Config config, DataHolder data, TreeBuilder builder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleTreePopulation

public SingleTreePopulation()
Method Detail

eval

public void eval(Fitness f,
                 TempOutputFactory tempOutputFactory,
                 DataHolder data)
Specified by:
eval in interface Population

getRawOutput

public Output getRawOutput(Individual ind,
                           TempOutputFactory tempOutputFactory,
                           DataHolder data)
Description copied from interface: Population
Get the output directly from the Individual, without further processing

Specified by:
getRawOutput in interface Population
Returns:
A totally independent Output object

getProcessedOutput

public Output getProcessedOutput(Individual ind,
                                 Fitness f,
                                 TempOutputFactory tempOutputFactory,
                                 DataHolder data)
Specified by:
getProcessedOutput in interface Population

get

public Individual get(int which)
Description copied from interface: Population
Get a certain individual

Specified by:
get in interface Population
Parameters:
which - The individual to get

doSelection

public void doSelection(IndSelector sel)
Specified by:
doSelection in interface Population

evolve

public void evolve(TreeOperator op)
Specified by:
evolve in interface Population

init

public void init(Config config,
                 DataHolder data,
                 TreeBuilder builder)
Specified by:
init in interface Population