Skip to content

Synapse Class

This class is responsible for bridging the connection between 2 nodes, housing the weight, and providing functions to easily manage it.

Synapse .new(Node input,Node output,number weight) Creates and returns the Synapse with the given input/output nodes and weight. !weight! defaults to 0.
void :call() Propagates the output node.

This function is fired when the Synapse object is called, such as:
synapse:()
number :GetValue() Returns the output of the input node.
void :SetInputNode(Node inputNode) Sets the input node.
Node :GetInputNode() Returns the input node.
void :SetOutputNode(Node outputNode) Sets the output node.
Node :GetOutputNode() Returns the output node.
number :GetWeight() Returns the weight.
void :AddWeight(number weightDelta) Adds !weightDelta! to the current weight.
void :SetWeight(number weight) Sets the weight.