nz.co.jedsimson.lgp.core.program.instructions

Package nz.co.jedsimson.lgp.core.program.instructions

Types

Arity

interface Arity

The arity of an operation, specifying how many arguments it can take.

BaseArity

enum class BaseArity : Arity

A base arity implementation that provides arity for instructions with one or two arguments.

BinaryOperation

abstract class BinaryOperation<T> : Operation<T>

An operation that has an arity of two (i.e. its function takes 2 arguments).

BranchOperation

abstract class BranchOperation<T> : BinaryOperation<T>

Instruction

abstract class Instruction<T> : Module

An instruction in an LGP program.

InstructionGenerator

abstract class InstructionGenerator<TProgram, TOutput : Output<TProgram>> : Module

A generator of instructions in an LGP system.

Operation

abstract class Operation<T> : Module

An operation has an Arity and some function that it can perform on Arguments given to it.

UnaryOperation

abstract class UnaryOperation<T> : Operation<T>

An operation that has an arity of one (i.e. its function takes 1 argument).

Exceptions

ArityException

class ArityException : Exception

Thrown when the Arity of an Operation does not match the number of lgp.core.evolution.registers.Arguments given to it.

Type Aliases

Function

typealias Function<T> = (arguments: Arguments<T>) -> T

The type of function that operations perform.

RegisterIndex

typealias RegisterIndex = Int