C# Class AForge.Genetic.ChromosomeBase

Chromosomes' base class.

The base class provides implementation of some IChromosome methods and properties, which are identical to all types of chromosomes.

Inheritance: IChromosome
Afficher le fichier Open project: holisticware-admin/MonoVersal.AForgeNET

Protected Properties

Свойство Type Description
fitness double

Méthodes publiques

Méthode Description
Clone ( ) : IChromosome

Clone the chromosome.

The method clones the chromosome returning the exact copy of it.

CompareTo ( object o ) : int

Compare two chromosomes.

CreateNew ( ) : IChromosome

Create new random chromosome with same parameters (factory method).

The method creates new chromosome of the same type, but randomly initialized. The method is useful as factory method for those classes, which work with chromosome's interface, but not with particular chromosome class.

Crossover ( IChromosome pair ) : void

Crossover operator.

The method performs crossover between two chromosomes – interchanging some parts of chromosomes.

Evaluate ( IFitnessFunction function ) : void

Evaluate chromosome with specified fitness function.

Calculates chromosome's fitness using the specifed fitness function.

Generate ( ) : void

Generate random chromosome value.

Regenerates chromosome's value using random number generator.

Mutate ( ) : void

Mutation operator.

The method performs chromosome's mutation, changing its part randomly.

Method Details

Clone() public abstract méthode

Clone the chromosome.

The method clones the chromosome returning the exact copy of it.

public abstract Clone ( ) : IChromosome
Résultat IChromosome

CompareTo() public méthode

Compare two chromosomes.
public CompareTo ( object o ) : int
o object Binary chromosome to compare to.
Résultat int

CreateNew() public abstract méthode

Create new random chromosome with same parameters (factory method).

The method creates new chromosome of the same type, but randomly initialized. The method is useful as factory method for those classes, which work with chromosome's interface, but not with particular chromosome class.

public abstract CreateNew ( ) : IChromosome
Résultat IChromosome

Crossover() public abstract méthode

Crossover operator.

The method performs crossover between two chromosomes – interchanging some parts of chromosomes.

public abstract Crossover ( IChromosome pair ) : void
pair IChromosome Pair chromosome to crossover with.
Résultat void

Evaluate() public méthode

Evaluate chromosome with specified fitness function.

Calculates chromosome's fitness using the specifed fitness function.

public Evaluate ( IFitnessFunction function ) : void
function IFitnessFunction Fitness function to use for evaluation of the chromosome.
Résultat void

Generate() public abstract méthode

Generate random chromosome value.

Regenerates chromosome's value using random number generator.

public abstract Generate ( ) : void
Résultat void

Mutate() public abstract méthode

Mutation operator.

The method performs chromosome's mutation, changing its part randomly.

public abstract Mutate ( ) : void
Résultat void

Property Details

fitness protected_oe property

Chromosome's fintess value.
protected double fitness
Résultat double