Interface Organism

All Superinterfaces:
Changeable
All Known Implementing Classes:
AbstractOrganism, SimpleOrganism

public interface Organism extends Changeable
A GA 'organism' contains one or more Chromosomes
Since:
1.5
Version:
1.0
Author:
Mark Schreiber, Susanne Merz, Andreas Dräger
  • Field Details

  • Method Details

    • setFitness

      void setFitness(double[] fitness)
      This method allows to set the fitness of this organism to the specified value. Generally this will be an array, which in the most cases contains just a single entry. In cases where we want to have multi-objective optimization we may want to make use of a more general fitness array with mutliple entries.
      Parameters:
      fitness -
    • getFitness

      double[] getFitness()
      Returns the current fitness of this organism. This is an array. Note that in the most cases this array may only contain one single value, but for multi-objective optimization it is necessary to store multiple fitness values.
      Returns:
      the fitness of the organism
    • getChromosomes

      Gets the organisms 'chromosome' sequences
      Returns:
      a SymbolList[]
    • setChromosomes

      void setChromosomes(SymbolList[] chromosomes) throws ChangeVetoException
      Sets the organisms 'chromosome' sequences.
      Parameters:
      chromosomes - a SymbolList[]
      Throws:
      ChangeVetoException - if the Chromosome collection of the Organism is unchangable
    • getName

      Gets the organisms name
      Returns:
      the name String
    • setName

      void setName(String name) throws ChangeVetoException
      Sets the organisms name
      Parameters:
      name - the name of the organism.
      Throws:
      ChangeVetoException - if the name may not be changed.
    • replicate

      Creates a replica of this Organism with a new name.
      Parameters:
      name - the new name for the sequence.
      Returns:
      the replicated organism.
    • isHaploid

      boolean isHaploid()
      Is the organism Haploid?
      Returns:
      true if it is.