C# 클래스 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.

상속: IChromosome
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET

보호된 프로퍼티들

프로퍼티 타입 설명
fitness double

공개 메소드들

메소드 설명
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.

메소드 상세

Clone() 공개 추상적인 메소드

Clone the chromosome.

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

public abstract Clone ( ) : IChromosome
리턴 IChromosome

CompareTo() 공개 메소드

Compare two chromosomes.
public CompareTo ( object o ) : int
o object Binary chromosome to compare to.
리턴 int

CreateNew() 공개 추상적인 메소드

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
리턴 IChromosome

Crossover() 공개 추상적인 메소드

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.
리턴 void

Evaluate() 공개 메소드

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.
리턴 void

Generate() 공개 추상적인 메소드

Generate random chromosome value.

Regenerates chromosome's value using random number generator.

public abstract Generate ( ) : void
리턴 void

Mutate() 공개 추상적인 메소드

Mutation operator.

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

public abstract Mutate ( ) : void
리턴 void

프로퍼티 상세

fitness 보호되어 있는 프로퍼티

Chromosome's fintess value.
protected double fitness
리턴 double