/// <summary> /// Clone the object. /// </summary> /// <returns>A clone of this object.</returns> public override object Clone() { OneToOneSynapse result = new OneToOneSynapse(FromLayer, ToLayer); return(result); }
/// <summary> /// Clone the object. /// </summary> /// <returns>A clone of this object.</returns> public override object Clone() { OneToOneSynapse result = new OneToOneSynapse(FromLayer, ToLayer); return result; }
/// <summary> /// Load the specified Encog object from an XML reader. /// </summary> /// <param name="xmlIn">The XML reader to use.</param> /// <returns>The loaded object.</returns> public IEncogPersistedObject Load(ReadXML xmlIn) { OneToOneSynapse synapse = new OneToOneSynapse(); return synapse; }
/// <summary> /// Add a "next" layer. /// </summary> /// <param name="next">The next layer to add.</param> /// <param name="type">The synapse type to use for this layer.</param> public void AddNext(ILayer next, SynapseType type) { ISynapse synapse = null; switch (type) { case SynapseType.OneToOne: synapse = new OneToOneSynapse(this, next); break; case SynapseType.Weighted: synapse = new WeightedSynapse(this, next); break; case SynapseType.Weightless: synapse = new WeightlessSynapse(this, next); break; case SynapseType.Direct: synapse = new DirectSynapse(this, next); break; case SynapseType.NEAT: synapse = new NEATSynapse(this, next); break; default: throw new NeuralNetworkError("Unknown synapse type"); } if (synapse == null) { String str = "Unknown synapse type."; #if logging if (BasicLayer.logger.IsErrorEnabled) { BasicLayer.logger.Error(str); } #endif throw new NeuralNetworkError(str); } else { this.next.Add(synapse); } }