public virtual void AddInputNeuron(INeuron neuron) { ISynapse synapse; if (neuron.GetType() == typeof(InputNeuron)) { synapse = new Synapse(neuron, this, neuron.Outputs[0].Weight); Inputs.Add(synapse); } else { synapse = new Synapse(neuron, this); Inputs.Add(synapse); neuron.Outputs.Add(synapse); } }
private bool IsBias(INeuron neuron) { return(neuron.GetType() == typeof(BiasNeuron)); }
private bool IsBias(INeuron neuron) { return neuron.GetType() == typeof (BiasNeuron); }