Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public Synapse(NeuronBase fromNode, NeuronBase toNode, double weight)
        {
            FromNode = fromNode;
            ToNode = toNode;

            if ((int)weight == -1)
                RandomiseWeights();
            else
                Weight = weight;
        }