Documentation ¶
Index ¶
- func Optimize(node Node)
- func ReplaceNode(old Node, new Node)
- type BaseNode
- func (node *BaseNode) AddLeaf(leaf Node) bool
- func (node *BaseNode) AddRandom(nodeToAdd Node)
- func (node *BaseNode) Eval(x, y float32) float32
- func (node *BaseNode) GetChildren() []Node
- func (node *BaseNode) GetParent() Node
- func (node *BaseNode) NodeCount() int
- func (node *BaseNode) SetChildren(children []Node)
- func (node *BaseNode) SetParent(parent Node)
- func (node *BaseNode) String() string
- type Node
- type OpAbs
- type OpAtan
- type OpAtan2
- type OpCeil
- type OpClip
- type OpConstant
- type OpCos
- type OpDiv
- type OpFBM
- type OpFloor
- type OpLerp
- type OpLog2
- type OpMinus
- type OpMult
- type OpNegate
- type OpNoise
- type OpPicture
- type OpPlus
- type OpSin
- type OpSquare
- type OpTurbulence
- type OpWrap
- type OpX
- type OpY
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceNode ¶
Types ¶
type Node ¶
type Node interface { Eval(x, y float32) float32 String() string SetParent(parent Node) GetParent() Node GetChildren() []Node SetChildren([]Node) AddRandom(node Node) AddLeaf(leaf Node) bool NodeCount() int }
func BeginLexing ¶
func GetRandomLeaf ¶
func GetRandomLeaf() Node
func GetRandomNode ¶
func GetRandomNode() Node
type OpConstant ¶
type OpConstant struct { BaseNode // contains filtered or unexported fields }
func NewOpConstant ¶
func NewOpConstant() *OpConstant
func (*OpConstant) Eval ¶
func (op *OpConstant) Eval(x, y float32) float32
func (*OpConstant) String ¶
func (op *OpConstant) String() string
type OpPicture ¶
type OpPicture struct {
BaseNode
}
func NewOpPicture ¶
func NewOpPicture() *OpPicture
type OpTurbulence ¶
type OpTurbulence struct {
BaseNode
}
func NewOpTurbulence ¶
func NewOpTurbulence() *OpTurbulence
func (*OpTurbulence) Eval ¶
func (op *OpTurbulence) Eval(x, y float32) float32
func (*OpTurbulence) String ¶
func (op *OpTurbulence) String() string
Click to show internal directories.
Click to hide internal directories.