kgp.tree / Terminal

Terminal

abstract class Terminal : Node

A node that does not have any child nodes.

Terminals are the leaf nodes of a program tree and must have an arity of 0.

Constructors

<init> Terminal()

A node that does not have any child nodes.

Properties

arity val arity: Int

The number of arguments that this node expects.

Functions

evaluate abstract fun evaluate(args: List<Double>): Double

Evaluates this node on a set of arguments.

Inheritors

Constant class Constant : Terminal

A terminal node that represents a constant value.

Input class Input : Terminal

A terminal node that represents a feature value.