C# 클래스 AForge.Genetic.PermutationChromosome

Permutation chromosome.

Permutation chromosome is based on short array chromosome, but has two features:

all genes are unique within chromosome, i.e. there are no two genes with the same value; maximum value of each gene is equal to chromosome length minus 1.
상속: AForge.Genetic.ShortArrayChromosome
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

공개 메소드들

메소드 설명
Clone ( ) : IChromosome

Clone the chromosome.

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

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 type.

Crossover ( IChromosome pair ) : void

Crossover operator.

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

Generate ( ) : void

Generate random chromosome value.

Regenerates chromosome's value using random number generator.

Mutate ( ) : void

Mutation operator.

The method performs chromosome's mutation, swapping two randomly chosen genes (array elements).

PermutationChromosome ( int length ) : System

Initializes a new instance of the PermutationChromosome class.

보호된 메소드들

메소드 설명
PermutationChromosome ( PermutationChromosome source ) : System

Initializes a new instance of the PermutationChromosome class.

This is a copy constructor, which creates the exact copy of specified chromosome.

비공개 메소드들

메소드 설명
CreateChildUsingCrossover ( ushort parent1, ushort parent2, ushort child ) : void
CreateIndexDictionary ( ushort genes ) : ushort[]

메소드 상세

Clone() 공개 메소드

Clone the chromosome.

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

public Clone ( ) : IChromosome
리턴 IChromosome

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 type.

public CreateNew ( ) : IChromosome
리턴 IChromosome

Crossover() 공개 메소드

Crossover operator.

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

public Crossover ( IChromosome pair ) : void
pair IChromosome Pair chromosome to crossover with.
리턴 void

Generate() 공개 메소드

Generate random chromosome value.

Regenerates chromosome's value using random number generator.

public Generate ( ) : void
리턴 void

Mutate() 공개 메소드

Mutation operator.

The method performs chromosome's mutation, swapping two randomly chosen genes (array elements).

public Mutate ( ) : void
리턴 void

PermutationChromosome() 보호된 메소드

Initializes a new instance of the PermutationChromosome class.

This is a copy constructor, which creates the exact copy of specified chromosome.

protected PermutationChromosome ( PermutationChromosome source ) : System
source PermutationChromosome Source chromosome to copy.
리턴 System

PermutationChromosome() 공개 메소드

Initializes a new instance of the PermutationChromosome class.
public PermutationChromosome ( int length ) : System
length int
리턴 System