nz.co.jedsimson.lgp.core.program.registers

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

Types

Argument

data class Argument<out T>

An Argument is essentially just the value of a particular Register, but in the context of an nz.co.jedsimson.lgp.core.program.instructions.Operation.

Arguments

class Arguments<T>

A simple collection of Arguments.

RandomRegisterGenerator

class RandomRegisterGenerator<T>

Generates an infinite random sequence of registers from the register set given.

Register

class Register<T>

A register that is available to an LGP program.

RegisterSet

class RegisterSet<T>

Represents a collection of Registers.

RegisterType

enum class RegisterType

Represents the type of a register.

Exceptions

RegisterAccessException

class RegisterAccessException : Exception

Thrown when a write operation is attempted on a RegisterType.Constant register.

RegisterWriteRangeException

class RegisterWriteRangeException : Exception

Thrown when the number of values being written to a particular register range, does not match the size of the range.

Functions

getRandomInputAndCalculationRegisters

fun <TRegister> RandomRegisterGenerator<TRegister>.getRandomInputAndCalculationRegisters(count: Int): MutableList<RegisterIndex>

Gets count registers with a random distribution of RegisterType.Input and RegisterType.Calculation.