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 a simple population formed by a fixed number of trees, each interpreded separatedly

See Also:
Serialized Form

Constructor Summary
SingleTreePopulation()
           
 
Method Summary
 void doSelection(IndSelector sel)
          Perform Individual selection
 void eval(MultiThreadedEvaluator evaluator, Fitness f, TempVectorFactory tempVectorFactory, ProblemData problemData, int[] wSamples)
          Evaluate every Individual and calculate their fitness
 void evolve(TreeOperator treeOp, TempVectorFactory tempVectorFactory, ProblemData problemData)
          Apply genetic operators
 Individual get(int which)
          Get a certain individual
 Output getProcessedOutput(Individual ind, Fitness f, TempVectorFactory tempVectorFactory, ProblemData problemData)
           
 Output getRawOutput(Individual ind, TempVectorFactory tempVectorFactory, ProblemData problemData)
          Get the output directly from the Individual, without further processing
 void init(Config config, ProblemData problemData, TreeBuilder builder, TreeOperator treeOp)
           
 
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(MultiThreadedEvaluator evaluator,
                 Fitness f,
                 TempVectorFactory tempVectorFactory,
                 ProblemData problemData,
                 int[] wSamples)
Description copied from interface: Population
Evaluate every Individual and calculate their fitness

Specified by:
eval in interface Population

getRawOutput

public Output getRawOutput(Individual ind,
                           TempVectorFactory tempVectorFactory,
                           ProblemData problemData)
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,
                                 TempVectorFactory tempVectorFactory,
                                 ProblemData problemData)
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)
Description copied from interface: Population
Perform Individual selection

Specified by:
doSelection in interface Population

evolve

public void evolve(TreeOperator treeOp,
                   TempVectorFactory tempVectorFactory,
                   ProblemData problemData)
Description copied from interface: Population
Apply genetic operators

Specified by:
evolve in interface Population

init

public void init(Config config,
                 ProblemData problemData,
                 TreeBuilder builder,
                 TreeOperator treeOp)
Specified by:
init in interface Population