org.apache.commons.math3.genetics
Class DummyListChromosome

java.lang.Object
  extended by org.apache.commons.math3.genetics.Chromosome
      extended by org.apache.commons.math3.genetics.AbstractListChromosome<Integer>
          extended by org.apache.commons.math3.genetics.DummyListChromosome
All Implemented Interfaces:
Comparable<Chromosome>, Fitness

public class DummyListChromosome
extends AbstractListChromosome<Integer>

Implementation of ListChromosome for testing purposes


Constructor Summary
DummyListChromosome(Integer[] representation)
           
DummyListChromosome(List<Integer> representation)
           
 
Method Summary
protected  void checkValidity(List<Integer> chromosomeRepresentation)
           
 boolean equals(Object obj)
           
 double fitness()
           
 int hashCode()
           
 AbstractListChromosome<Integer> newFixedLengthChromosome(List<Integer> chromosomeRepresentation)
           
 
Methods inherited from class org.apache.commons.math3.genetics.AbstractListChromosome
getLength, getRepresentation, toString
 
Methods inherited from class org.apache.commons.math3.genetics.Chromosome
compareTo, findSameChromosome, getFitness, isSame, searchForFitnessUpdate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DummyListChromosome

public DummyListChromosome(Integer[] representation)

DummyListChromosome

public DummyListChromosome(List<Integer> representation)
Method Detail

fitness

public double fitness()

checkValidity

protected void checkValidity(List<Integer> chromosomeRepresentation)
                      throws InvalidRepresentationException
Specified by:
checkValidity in class AbstractListChromosome<Integer>
Throws:
InvalidRepresentationException

newFixedLengthChromosome

public AbstractListChromosome<Integer> newFixedLengthChromosome(List<Integer> chromosomeRepresentation)
Specified by:
newFixedLengthChromosome in class AbstractListChromosome<Integer>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.