/// <summary> /// Adds input connection for this competitive neuron /// </summary> /// <param name="connection">input connection</param> public override void AddInputConnection(Connection connection) { base.AddInputConnection(connection); if (connection.FromNeuron.ParentLayer == this .ParentLayer) { connectionsFromThisLayer.Add(connection); } else { connectionsFromOtherLayers.Add(connection); } }
/// <summary> /// Adds input connection with the given weight, from given neuron /// </summary> /// <param name="fromNeuron">neuron to connect from</param> /// <param name="weightVal">connection weight value</param> public virtual void AddInputConnection(Neuron fromNeuron, double weightVal) { Connection connection = new Connection(fromNeuron, this, weightVal); this.AddInputConnection(connection); }
/// <summary> /// Adds the specified output connection /// </summary> /// <param name="connection">connection output connection to add</param> protected virtual void AddOutputConnection(Connection connection) { this.outConnections.Add(connection); }
/// <summary> /// Adds input connection from specified neuron /// </summary> /// <param name="fromNeuron">neuron to connect from</param> public virtual void AddInputConnection(Neuron fromNeuron) { Connection connection = new Connection(fromNeuron, this); this.AddInputConnection(connection); }
/// <summary> /// Adds the specified input connection /// </summary> /// <param name="connection">input connection to add</param> public virtual void AddInputConnection(Connection connection) { this.inputConnections.Add(connection); Neuron fromNeuron = connection.FromNeuron; fromNeuron.AddOutputConnection(connection); }
/// <summary> /// Creates connection between two specified neurons /// </summary> /// <param name="from">output neuron</param> /// <param name="to">input neuron</param> /// <param name="weight">connection weight</param> public static void CreateConnection(Neuron from, Neuron to, Weight weight) { Connection connection = new Connection(from, to, weight); to.AddInputConnection(connection); }
/// <summary> /// Creates connection with specified weight value between specified neurons /// </summary> /// <param name="fromNeuron">neuron to connect</param> /// <param name="toNeuron">neuron to connect to</param> /// <param name="weightVal">connection weight value</param> public void CreateConnection(Neuron fromNeuron, Neuron toNeuron, double weightVal) { Connection connection = new Connection(fromNeuron, toNeuron, weightVal); toNeuron.AddInputConnection(connection); }
public override void AddInputConnection(Connection connection) { }