C# Class Encog.Solve.Genetic.Genome.BasicGenome

A basic abstract genome. Provides base functionality.
Inheritance: IGenome
Show file Open project: encog/encog-silverlight-core

Public Methods

Method Description
BasicGenome ( GeneticAlgorithm geneticAlgorithm ) : System

Construct a basic genome.

CalculateGeneCount ( ) : int

The number of genes in this genome.

CompareTo ( IGenome other ) : int

Used to compare two chromosomes. Used to sort by score.

Decode ( ) : void

Use the genes to update the organism.

Encode ( ) : void

Use the organism to update the genes.

Mate ( IGenome father, IGenome child1, IGenome child2 ) : void

Mate two genomes. Will loop over all chromosomes.

ToString ( ) : String

Convert the chromosome to a string.

Method Details

BasicGenome() public method

Construct a basic genome.
public BasicGenome ( GeneticAlgorithm geneticAlgorithm ) : System
geneticAlgorithm GeneticAlgorithm The GA this genome belongs to.
return System

CalculateGeneCount() public method

The number of genes in this genome.
public CalculateGeneCount ( ) : int
return int

CompareTo() public method

Used to compare two chromosomes. Used to sort by score.
public CompareTo ( IGenome other ) : int
other IGenome The other chromosome to compare.
return int

Decode() public abstract method

Use the genes to update the organism.
public abstract Decode ( ) : void
return void

Encode() public abstract method

Use the organism to update the genes.
public abstract Encode ( ) : void
return void

Mate() public method

Mate two genomes. Will loop over all chromosomes.
public Mate ( IGenome father, IGenome child1, IGenome child2 ) : void
father IGenome The father.
child1 IGenome The first child.
child2 IGenome The second child.
return void

ToString() public method

Convert the chromosome to a string.
public ToString ( ) : String
return String