gpalta.clustering
Class TreeGroup

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

public class TreeGroup
extends Individual

See Also:
Serialized Form

Constructor Summary
TreeGroup(int nTrees)
          Creates a new instance of TreeGroup
 
Method Summary
 Individual deepClone()
          Get a new, totally independent copy of this individual.
 int getSize()
          Get the size of this Individual, hopefully without recalculating it (ie. in the case of a Tree, without descending every node).
 BufferedTree getTree(int pos)
           
 int nTrees()
           
 void oneLessCluster()
           
 void oneMoreCluster()
           
 void removeEmptyClusters()
           
 Individual semiDeepClone()
          Get a copy of this Individual, that not necessarily insures independece between both copies.
 void setSamplesWon(int wCluster, int nSamples)
           
 void setTree(int pos, BufferedTree 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

TreeGroup

public TreeGroup(int nTrees)
Creates a new instance of TreeGroup

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

semiDeepClone

public Individual semiDeepClone()
Description copied from class: Individual
Get a copy of this Individual, that not necessarily insures independece between both copies. By defalut, this method calls deepClone. Subclasses should override it sould they see the need.

Overrides:
semiDeepClone in class Individual

setTree

public void setTree(int pos,
                    BufferedTree t)

getTree

public BufferedTree getTree(int pos)

oneMoreCluster

public void oneMoreCluster()

oneLessCluster

public void oneLessCluster()

removeEmptyClusters

public void removeEmptyClusters()

setSamplesWon

public void setSamplesWon(int wCluster,
                          int nSamples)