public static void ConnectNodes(NeuronBase fromNode, NeuronBase toNode, double weight) { Synapse s = new Synapse(fromNode, toNode, weight); fromNode.ForwardConnections.Add(s); toNode.BackwardConnections.Add(s); }
public Synapse(NeuronBase fromNode, NeuronBase toNode, double weight) { FromNode = fromNode; ToNode = toNode; if ((int)weight == -1) RandomiseWeights(); else Weight = weight; }