Pascal Serrarens 3f8716794a Squashed 'NanoBrain/' changes from fbca658..3eb4ab7
3eb4ab7 Cleanup

git-subtree-dir: NanoBrain
git-subtree-split: 3eb4ab7993054a9ec75ba7cadede74bfb213e34f
2026-04-08 09:33:52 +02:00

33 lines
925 B
C#

using System;
using UnityEngine;
namespace NanoBrain {
/// <summary>
/// A Synapse connects the ouput of a Neuron to another Neuron
/// </summary>
[Serializable]
public class Synapse {
/// <summary>
/// The neuron from which input is received
/// </summary>
[SerializeReference]
public Neuron neuron;
/// <summary>
/// The weight value to apply to the Neuron input
/// </summary>
public float weight;
/// <summary>
/// Create a new Synapse
/// </summary>
/// <param name="nucleus">The neuron from which input is received</param>
/// <param name="weight">The weight value to apply to the Neuron input</param>
public Synapse(Neuron nucleus, float weight = 1.0f) {
this.neuron = nucleus;
this.weight = weight;
}
}
}