C# 클래스 AForge.Genetic.SimpleGeneFunction

Genetic programming gene, which represents simple arithmetic functions and arguments.

Simple gene function may represent an arithmetic function (+, -, *, /) or an argument to function. This class is used by Genetic Programming (or Gene Expression Programming) chromosomes to build arbitrary expressions with help of genetic operators.

상속: IGPGene
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
rand AForge.ThreadSafeRandom

공개 메소드들

메소드 설명
Clone ( ) : IGPGene

Clone the gene.

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

CreateNew ( ) : IGPGene

Creates new gene with random type and value.

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

CreateNew ( GPGeneType type ) : IGPGene

Creates new gene with certain type and random value.

The method creates new gene with specified type, but random value. The method is useful as factory method for those classes, which work with gene's interface, but not with particular gene class.

Generate ( ) : void

Randomize gene with random type and value.

The method randomizes the gene, setting its type and value randomly.

Generate ( GPGeneType type ) : void

Randomize gene with random value.

The method randomizes a gene, setting its value randomly, but type is set to the specified one.

SimpleGeneFunction ( int variablesCount ) : System

Initializes a new instance of the SimpleGeneFunction class.

The constructor creates randomly initialized gene with random type and value by calling Generate( ) method.

SimpleGeneFunction ( int variablesCount, GPGeneType type ) : System

Initializes a new instance of the SimpleGeneFunction class.

The constructor creates randomly initialized gene with random value and preset gene type.

ToString ( ) : string

Get string representation of the gene.

비공개 메소드들

메소드 설명
SimpleGeneFunction ( int variablesCount, bool random ) : System

메소드 상세

Clone() 공개 메소드

Clone the gene.

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

public Clone ( ) : IGPGene
리턴 IGPGene

CreateNew() 공개 메소드

Creates new gene with random type and value.

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

public CreateNew ( ) : IGPGene
리턴 IGPGene

CreateNew() 공개 메소드

Creates new gene with certain type and random value.

The method creates new gene with specified type, but random value. The method is useful as factory method for those classes, which work with gene's interface, but not with particular gene class.

public CreateNew ( GPGeneType type ) : IGPGene
type GPGeneType Gene type to create.
리턴 IGPGene

Generate() 공개 메소드

Randomize gene with random type and value.

The method randomizes the gene, setting its type and value randomly.

public Generate ( ) : void
리턴 void

Generate() 공개 메소드

Randomize gene with random value.

The method randomizes a gene, setting its value randomly, but type is set to the specified one.

public Generate ( GPGeneType type ) : void
type GPGeneType Gene type to set.
리턴 void

SimpleGeneFunction() 공개 메소드

Initializes a new instance of the SimpleGeneFunction class.

The constructor creates randomly initialized gene with random type and value by calling Generate( ) method.

public SimpleGeneFunction ( int variablesCount ) : System
variablesCount int Total amount of variables in the task which is supposed /// to be solved.
리턴 System

SimpleGeneFunction() 공개 메소드

Initializes a new instance of the SimpleGeneFunction class.

The constructor creates randomly initialized gene with random value and preset gene type.

public SimpleGeneFunction ( int variablesCount, GPGeneType type ) : System
variablesCount int Total amount of variables in the task which is supposed /// to be solved.
type GPGeneType Gene type to set.
리턴 System

ToString() 공개 메소드

Get string representation of the gene.
public ToString ( ) : string
리턴 string

프로퍼티 상세

rand 보호되어 있는 정적으로 프로퍼티

Random number generator for chromosoms generation.
protected static ThreadSafeRandom,AForge rand
리턴 AForge.ThreadSafeRandom