simbad.picoevo.core.representation
Class PopulationView

java.lang.Object
  extended by simbad.picoevo.core.representation.PopulationView
All Implemented Interfaces:
java.lang.Cloneable, PopulationInterface

public class PopulationView
extends java.lang.Object
implements PopulationInterface, java.lang.Cloneable

Author:
nicolas This class should be mainly used as an extended wrapper for a list of individual. E.g. You may implement sort methods.

Field Summary
 java.util.ArrayList _individualList
           
 
Constructor Summary
PopulationView()
          stats with an empty list of individuals
PopulationView(java.util.ArrayList __individualList)
          starts with a list of individuals that is a clone (i.e.
PopulationView(Population __population)
          starts with a list of individuals that is a clone (i.e.
 
Method Summary
 java.lang.Object clone()
           
 Individual getIndividual(int __index)
           
 java.util.ArrayList getIndividualList()
           
 int getPopulationSize()
           
 void registerIndividual(Individual __individual)
          register individual, i.e.
 void reset()
          Set any list to null in order to ease garbage collecting.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_individualList

public java.util.ArrayList _individualList
Constructor Detail

PopulationView

public PopulationView()
stats with an empty list of individuals


PopulationView

public PopulationView(Population __population)
starts with a list of individuals that is a clone (i.e. can be altered) of the targetted population


PopulationView

public PopulationView(java.util.ArrayList __individualList)
starts with a list of individuals that is a clone (i.e. can be altered) of the list given as parameter

Method Detail

getIndividualList

public java.util.ArrayList getIndividualList()
Specified by:
getIndividualList in interface PopulationInterface

getPopulationSize

public int getPopulationSize()
Specified by:
getPopulationSize in interface PopulationInterface

registerIndividual

public void registerIndividual(Individual __individual)
register individual, i.e. add a pointer to this individual (no cloning)

Specified by:
registerIndividual in interface PopulationInterface

getIndividual

public Individual getIndividual(int __index)
Specified by:
getIndividual in interface PopulationInterface

reset

public void reset()
Description copied from interface: PopulationInterface
Set any list to null in order to ease garbage collecting.

Specified by:
reset in interface PopulationInterface

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object