Pascal Serrarens 96f1f8924f
All checks were successful
Copy Documentation to webserver / copy-documentation (push) Successful in 24s
Completed docs for all but Neuron
2026-05-07 15:48:54 +02:00

34 lines
927 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;
}
}
}