NeuralNetworks.Neuron.AddConnection C# (CSharp) Method

AddConnection() public method

public AddConnection ( Neuron neuron, bool to, double weight ) : void
neuron Neuron
to bool
weight double
return void
        public void AddConnection(Neuron neuron, bool to, double weight = 0/*, double bias = 0*/)
        {
            Connection c;

            if (to)
                c = new Connection(this, neuron, weight);
            else
                c = new Connection(neuron, this, weight);

            this.Connections.Add(c);
            neuron.Connections.Add(c);
        }