| Package | com.suckatmath.machinelearning.genetic.impl |
| Class | public class BinaryTreeGenome |
| Inheritance | BinaryTreeGenome Object |
| Implements | Genome |
| Property | Defined By | ||
|---|---|---|---|
| gene : Gene
content Gene for this node
| BinaryTreeGenome | ||
| left : BinaryTreeGenome
BinaryTreeGenome left child of this Genome
| BinaryTreeGenome | ||
| parent : BinaryTreeGenome
reference to parent BinaryTreeGenome
| BinaryTreeGenome | ||
| randomNodeLimit : int
maximum number of random nodes to generate in newRandom - defaults to 1
| BinaryTreeGenome | ||
| right : BinaryTreeGenome
BinaryTreeGenome right child of this Genome
| BinaryTreeGenome | ||
| Method | Defined By | ||
|---|---|---|---|
constructs a new empty BinaryTreeGenome
| BinaryTreeGenome | ||
return a copy of this BinaryTreeGenome
| BinaryTreeGenome | ||
generate a new genome through "sexual" reproduction combining subtrees of a collection of BinaryTreeGenomes
| BinaryTreeGenome | ||
create a copy of this Genome with some probability of mutation in a single Gene
| BinaryTreeGenome | ||
generate a new random BinaryTreeGenome
| BinaryTreeGenome | ||
setLeft(b:BinaryTreeGenome):void
sets left child genome
| BinaryTreeGenome | ||
setParent(b:BinaryTreeGenome):void
set back reference to parent genome
| BinaryTreeGenome | ||
setRandomNodeLimit(i:int):void
set maximum number of nodes to generate in newRandom
| BinaryTreeGenome | ||
setRight(b:BinaryTreeGenome):void
sets right child genome
| BinaryTreeGenome | ||
toString():String
return a String representation of this BinaryTreeGenome
reports in indented multi-line depth first order, where left is before right
| BinaryTreeGenome | ||
| gene | property |
public var gene:Genecontent Gene for this node
| left | property |
public var left:BinaryTreeGenomeBinaryTreeGenome left child of this Genome
| parent | property |
public var parent:BinaryTreeGenomereference to parent BinaryTreeGenome
| randomNodeLimit | property |
public var randomNodeLimit:intmaximum number of random nodes to generate in newRandom - defaults to 1
| right | property |
public var right:BinaryTreeGenomeBinaryTreeGenome right child of this Genome
| BinaryTreeGenome | () | Constructor |
public function BinaryTreeGenome()constructs a new empty BinaryTreeGenome
| clone | () | method |
public function clone():Genomereturn a copy of this BinaryTreeGenome
ReturnsGenome — BinaryTreeGenome as Genome
|
| crossover | () | method |
public function crossover(others:Array, numpoints:int):Genomegenerate a new genome through "sexual" reproduction combining subtrees of a collection of BinaryTreeGenomes
Parameters
others:Array — Array of BinaryTreeGenome
| |
numpoints:int — int number of splice points for subtree replacement
|
Genome — BinaryTreeGenome as Genome
|
| mutate | () | method |
public function mutate(probability:Number):Genomecreate a copy of this Genome with some probability of mutation in a single Gene
Parameters
probability:Number |
Genome — Genome
|
| newRandom | () | method |
public function newRandom():Genomegenerate a new random BinaryTreeGenome
ReturnsGenome — BinaryTreeGenome as Genome
|
| setLeft | () | method |
public function setLeft(b:BinaryTreeGenome):voidsets left child genome
Parameters
b:BinaryTreeGenome — BinaryTreeGenome
|
| setParent | () | method |
public function setParent(b:BinaryTreeGenome):voidset back reference to parent genome
Parameters
b:BinaryTreeGenome — BinaryTreeGenome
|
| setRandomNodeLimit | () | method |
public function setRandomNodeLimit(i:int):voidset maximum number of nodes to generate in newRandom
Parameters
i:int — int
|
| setRight | () | method |
public function setRight(b:BinaryTreeGenome):voidsets right child genome
Parameters
b:BinaryTreeGenome — BinaryTreeGenome
|
| toString | () | method |
public function toString():Stringreturn a String representation of this BinaryTreeGenome reports in indented multi-line depth first order, where left is before right
ReturnsString — String
|