/// <summary> /// Constructs a new layer, and sets some initial values /// </summary> /// <param name="OwnedDNAToSet">DNA that dictates the properties of the layer</param> /// <param name="DestinationLayerToSet">Initial Destination layer.</param> /// <param name="SourceLayerToSet">Initial source layer</param> public Layer(Brain OwnedBrainToSet, DNA OwnedDNAToSet, Layer DestinationLayerToSet, Layer SourceLayerToSet, bool UseByteResolution) { this.ByteResolution =UseByteResolution; this.OwnedBrain = OwnedBrainToSet; this.SourceLayer = SourceLayerToSet; this.DestinationLayer = DestinationLayerToSet; this.OwnedDNA = OwnedDNAToSet; this.Uid = this.OwnedBrain.GetNextLayerId(); }
/// <summary> /// Creates a new InputLayer and initilizes some values /// </summary> /// <param name="OwnedDNAToSet">DNA that dictates the attributes of the layer</param> /// <param name="DestinationLayerToSet">Destination layer to connect this layer to</param> public InputLayer(Brain OwnedBrainToSet, DNA OwnedDNAToSet, Layer DestinationLayerToSet, bool UseByteResolution) : base(OwnedBrainToSet, OwnedDNAToSet, DestinationLayerToSet, null, UseByteResolution) { this.SourceLayer = null; }
/// <summary> /// Constructs a new input neuron and sets some inital value /// </summary> /// <param name="OwningLayerToSet">Layer that owns the new neuron</param> /// <param name="OwnedDNAToSet">DNA that sets the neurons properties</param> public InputNeuron(Layer OwningLayerToSet, DNA OwnedDNAToSet, bool IsByteResolution) : base(OwningLayerToSet, OwnedDNAToSet, IsByteResolution) { if((OwningLayerToSet is InputLayer) != true) throw new Exception("Input neuron can only belong to an InputLayer"); }
/// <summary> /// Constructs a new OutputNeuron and sets some intial data. /// </summary> /// <param name="OwningLayerToSet">Layer that owns the neuron</param> /// <param name="OwnedDNAToSet">DNA that dictates the neurons properties</param> public OutputNeuron(Layer OwningLayerToSet, DNA OwnedDNAToSet, bool IsByteResolution) : base(OwningLayerToSet, OwnedDNAToSet, IsByteResolution) { if((OwningLayerToSet is OutputLayer) != true) throw new Exception("OutputNeurons can only belong to OutputLayers"); }