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);
}