C# Class 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.

Inheritance: ICloneable
Datei anzeigen Open project: stefan-j/GeneticMIDI Class Usage Examples

Public Properties

Property Type Description
Children List
Gene IGPGene

Public Methods

Method Description
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 +".

Private Methods

Method Description
GPCustomTreeNode ( ) : System

Initializes a new instance of the GPTreeNode class.

Method Details

Clone() public method

Clone the tree node.
public Clone ( ) : object
return object

GPCustomTreeNode() public method

Initializes a new instance of the GPTreeNode class.
public GPCustomTreeNode ( IGPGene gene ) : System
gene IGPGene
return System

Generate() public method

public Generate ( IEnumerable notes ) : void
notes IEnumerable
return void

GenerateNotes() public method

public GenerateNotes ( ) : List
return List

Repeat() public method

public Repeat ( int n ) : GPCustomTreeNode
n int
return GPCustomTreeNode

ShiftDuration() public method

public ShiftDuration ( int val ) : void
val int
return void

ShiftPitch() public method

public ShiftPitch ( int val ) : void
val int
return void

Swap() public method

public Swap ( ) : void
return void

ToString() public method

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
return string

Property Details

Children public_oe property

List of node's children.
public List Children
return List

Gene public_oe property

Gene represented by the chromosome.
public IGPGene Gene
return IGPGene