gpalta.multitree
Class MultiTreeIndividual

java.lang.Object
  extended by gpalta.core.Individual
      extended by gpalta.multitree.MultiTreeIndividual
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class MultiTreeIndividual
extends Individual

An individual composed of multiple trees

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gpalta.core.Individual
fitCalculated, hits
 
Constructor Summary
MultiTreeIndividual(int nTrees)
           
 
Method Summary
 Individual deepClone()
          Get a new, totally independent copy of this individual.
 Output eval(ProblemData problemData)
           
 void evalVect(Output out, TempVectorFactory tempVectorFactory, ProblemData problemData)
           
 int getSize()
          Get the size of this Individual, hopefully without recalculating it (ie. in the case of a Tree, without descending every node).
 Tree getTree(int pos)
           
 int nTrees()
           
 void setTree(int pos, Tree t)
           
 
Methods inherited from class gpalta.core.Individual
isOnPop, readFitness, setFitness, setOnPop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiTreeIndividual

public MultiTreeIndividual(int nTrees)
Method Detail

nTrees

public int nTrees()

getSize

public int getSize()
Description copied from class: Individual
Get the size of this Individual, hopefully without recalculating it (ie. in the case of a Tree, without descending every node). In most cases, this will mean the number of nodes present in the Individual

Specified by:
getSize in class Individual

deepClone

public Individual deepClone()
Description copied from class: Individual
Get a new, totally independent copy of this individual. Subclasses must implement this method properly, in order to insure that two instances are not modified unintentionally

Specified by:
deepClone in class Individual

eval

public Output eval(ProblemData problemData)
Specified by:
eval in class Individual

evalVect

public void evalVect(Output out,
                     TempVectorFactory tempVectorFactory,
                     ProblemData problemData)
Specified by:
evalVect in class Individual

setTree

public void setTree(int pos,
                    Tree t)

getTree

public Tree getTree(int pos)