Class: LinearConditionalNode

LinearConditionalNode

new LinearConditionalNode(func, registerSet)

Linear genetic programming conditional node

Parameters:
Name Type Description
func function

A function that this node will represent

registerSet RegisterSet

A register set instance

Source:

Extends

Methods

execute(registerSet) → {boolean}

Returns the return value of the function from the given register set

Parameters:
Name Type Description
registerSet RegisterSet

A register set instance

Source:
Returns:

The return value of the function from the given register set

Type
boolean

getArgumentsString() → {string}

Returns a comma seperated string of input registers

Inherited From:
Source:
Returns:

A comma seperated string of input registers

Type
string

getFuncReturnValue(registerSet) → {*}

Returns the value returned by the nodes function based on the input values from a given register set

Parameters:
Name Type Description
registerSet RegisterSet

A register set instance

Inherited From:
Source:
Returns:

Functon return value

Type
*

setInputRegisters(registerSet) → {LinearGPNode}

Randomly sets two input registers based on the provided register set

Parameters:
Name Type Description
registerSet RegisterSet

A register set instance

Inherited From:
Source:
Returns:

Reference to current object for chaining

Type
LinearGPNode

toString() → {string}

Returns a string representation of the linear conditional node

Source:
Returns:

A string representation of the linear conditional node

Type
string