org.encog.ml.ea.codec
Class GenomeAsPhenomeCODEC
- java.lang.Object
-
- org.encog.ml.ea.codec.GenomeAsPhenomeCODEC
-
- All Implemented Interfaces:
- GeneticCODEC
public class GenomeAsPhenomeCODEC extends java.lang.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
Constructors Constructor and Description GenomeAsPhenomeCODEC()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description MLMethoddecode(Genome genome)Decode the specified genome into a phenome.Genomeencode(MLMethod phenotype)Attempt to build a genome from a phenome.
-
-
-
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:
decodein interfaceGeneticCODEC- 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:
encodein interfaceGeneticCODEC- Parameters:
phenotype- The phenotype.- Returns:
- The genome.
-
-
DMelt 3.0 © DataMelt by jWork.ORG