C# Класс AForge.Genetic.GPCustomTreeNode

Represents tree node of genetic programming tree.

In genetic programming a chromosome is represented by a tree, which is represented by GPTreeChromosome class. The GPTreeNode class represents single node of such genetic programming tree.

Each node may or may not have children. This means that particular node of a genetic programming tree may represent its sub tree or even entire tree.

Наследование: ICloneable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Children List
Gene IGPGene

Открытые методы

Метод Описание
Clone ( ) : object

Clone the tree node.

GPCustomTreeNode ( IGPGene gene ) : System

Initializes a new instance of the GPTreeNode class.

Generate ( IEnumerable notes ) : void
GenerateNotes ( ) : List
Repeat ( int n ) : GPCustomTreeNode
ShiftDuration ( int val ) : void
ShiftPitch ( int val ) : void
Swap ( ) : void
ToString ( ) : string

Get string representation of the node.

String representation of the node lists all node's children and then the node itself. Such node's string representations equals to its reverse polish notation.

For example, if nodes value is '+' and its children are '3' and '5', then nodes string representation is "3 5 +".

Приватные методы

Метод Описание
GPCustomTreeNode ( ) : System

Initializes a new instance of the GPTreeNode class.

Описание методов

Clone() публичный Метод

Clone the tree node.
public Clone ( ) : object
Результат object

GPCustomTreeNode() публичный Метод

Initializes a new instance of the GPTreeNode class.
public GPCustomTreeNode ( IGPGene gene ) : System
gene IGPGene
Результат System

Generate() публичный Метод

public Generate ( IEnumerable notes ) : void
notes IEnumerable
Результат void

GenerateNotes() публичный Метод

public GenerateNotes ( ) : List
Результат List

Repeat() публичный Метод

public Repeat ( int n ) : GPCustomTreeNode
n int
Результат GPCustomTreeNode

ShiftDuration() публичный Метод

public ShiftDuration ( int val ) : void
val int
Результат void

ShiftPitch() публичный Метод

public ShiftPitch ( int val ) : void
val int
Результат void

Swap() публичный Метод

public Swap ( ) : void
Результат void

ToString() публичный Метод

Get string representation of the node.

String representation of the node lists all node's children and then the node itself. Such node's string representations equals to its reverse polish notation.

For example, if nodes value is '+' and its children are '3' and '5', then nodes string representation is "3 5 +".

public ToString ( ) : string
Результат string

Описание свойств

Children публичное свойство

List of node's children.
public List Children
Результат List

Gene публичное свойство

Gene represented by the chromosome.
public IGPGene Gene
Результат IGPGene