org.encog.ml.ea.codec
Class GenomeAsPhenomeCODEC

java.lang.Object
  extended by org.encog.ml.ea.codec.GenomeAsPhenomeCODEC
All Implemented Interfaces:
GeneticCODEC

public class GenomeAsPhenomeCODEC
extends Object
implements GeneticCODEC

This is a simple pass-through CODEC. This CODEC is used when the genome and phenome are the same class, and no decoding is necessary.


Constructor Summary
GenomeAsPhenomeCODEC()
           
 
Method Summary
 MLMethod decode(Genome genome)
          Decode the specified genome into a phenome.
 Genome encode(MLMethod phenotype)
          Attempt to build a genome from a phenome.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenomeAsPhenomeCODEC

public GenomeAsPhenomeCODEC()
Method Detail

decode

public MLMethod decode(Genome genome)
Decode the specified genome into a phenome. A phenome is an actual instance of a genome that you can query.

Specified by:
decode in interface GeneticCODEC
Parameters:
genome - The genome to decode.
Returns:
The phenome.

encode

public Genome encode(MLMethod phenotype)
Attempt to build a genome from a phenome. Note: not all CODEC's support this. If it is unsupported, an exception will be thrown.

Specified by:
encode in interface GeneticCODEC
Parameters:
phenotype - The phenotype.
Returns:
The genome.


Copyright © 2014. All Rights Reserved.