Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
Type NodeType
Value string // The name of the function or the terminal value (e.g. "ADD", "X", "5")
Children []*Node
}
Node represents a single node in the abstract syntax tree.
func GenerateFull ¶
func GenerateFull(rng *rand.Rand, maxDepth int, pset PrimitiveSet) *Node
GenerateFull creates a tree where all branches reach the exact maxDepth.
func GenerateGrow ¶
func GenerateGrow(rng *rand.Rand, maxDepth int, pset PrimitiveSet) *Node
GenerateGrow creates a tree where branches may end before maxDepth.
Click to show internal directories.
Click to hide internal directories.