es.udc.gii.common.eaf.algorithm.operator.replace.mmga
Class Hypercube.Cell

java.lang.Object
  extended by es.udc.gii.common.eaf.algorithm.operator.replace.mmga.Hypercube.Cell
Enclosing class:
Hypercube

public class Hypercube.Cell
extends java.lang.Object

This class represents a cell of a hypercube.


Field Summary
private  java.util.List<Individual> individualsInCell
          Individuals in this cell.
 
Constructor Summary
Hypercube.Cell()
          Class cosnstructor.
 
Method Summary
private  void addIndividual(Individual individual)
          Adds an individual to a cell.
 Individual getIndividual(int index)
          Returns an individual with index 'index'.
 java.util.List<Individual> getIndividuals()
          Returns a list of all the individuals of this cell.
 int getIndividualsCount()
          Returns the number of individuals that populate this cell.
 Individual getRandomIndividual()
          Returns a random individual from this cell.
 void removeIndividual(Individual individual)
          Removes an individual from this cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

individualsInCell

private java.util.List<Individual> individualsInCell
Individuals in this cell.

Constructor Detail

Hypercube.Cell

public Hypercube.Cell()
Class cosnstructor.

Method Detail

addIndividual

private void addIndividual(Individual individual)
Adds an individual to a cell. Only the hypercube should add individuals to cells since it checks that an individual really belongs to a cell. So this method has private visibility and is only accesible by the classes Cell and Hypercube.


getIndividuals

public java.util.List<Individual> getIndividuals()
Returns a list of all the individuals of this cell.


getIndividualsCount

public int getIndividualsCount()
Returns the number of individuals that populate this cell.


removeIndividual

public void removeIndividual(Individual individual)
Removes an individual from this cell.


getIndividual

public Individual getIndividual(int index)
Returns an individual with index 'index'.


getRandomIndividual

public Individual getRandomIndividual()
Returns a random individual from this cell.