/// <summary>
        /// Load the neural logic object.
        /// </summary>
        /// <param name="xmlIn">The XML object.</param>
        private void HandleLogic(ReadXML xmlIn)
        {
            String value = xmlIn.ReadTextToTag();

            if (value.Equals("ART1Logic"))
            {
                this.currentNetwork.Logic = new ART1Logic();
            }
            else if (value.Equals("BAMLogic"))
            {
                this.currentNetwork.Logic = new BAMLogic();
            }
            else if (value.Equals("BoltzmannLogic"))
            {
                this.currentNetwork.Logic = new BoltzmannLogic();
            }
            else if (value.Equals("FeedforwardLogic"))
            {
                this.currentNetwork.Logic = new FeedforwardLogic();
            }
            else if (value.Equals("HopfieldLogic"))
            {
                this.currentNetwork.Logic = new HopfieldLogic();
            }
            else if (value.Equals("SimpleRecurrentLogic"))
            {
                this.currentNetwork.Logic = new SimpleRecurrentLogic();
            }
            else
            {
                INeuralLogic logic = (INeuralLogic)Assembly.GetExecutingAssembly().CreateInstance(value);
                this.currentNetwork.Logic = logic;
            }
        }
        /// <summary>
        /// Save the neural logic object.
        /// </summary>
        /// <param name="xmlOut">The XML object.</param>
        private void SaveLogic(WriteXML xmlOut)
        {
            xmlOut.BeginTag(BasicNetworkPersistor.TAG_LOGIC);
            INeuralLogic logic = this.currentNetwork.Logic;

            if (logic is FeedforwardLogic ||
                logic is SimpleRecurrentLogic ||
                logic is BoltzmannLogic ||
                logic is ART1Logic || logic is BAMLogic ||
                logic is HopfieldLogic)
            {
                xmlOut.AddText(logic.GetType().Name);
            }
            else
            {
                xmlOut.AddText(logic.GetType().Name);
            }
            xmlOut.EndTag();
        }
예제 #3
0
 /// <summary>
 /// Construct a basic network with the specified logic.
 /// </summary>
 /// <param name="logic">The logic to use with this network.</param>
 public BasicNetwork(INeuralLogic logic)
 {
     this.structure = new NeuralStructure(this);
     this.logic = logic;
 }
예제 #4
0
 /// <summary>
 /// Construct an empty neural network.
 /// </summary>
 public BasicNetwork()
 {
     this.structure = new NeuralStructure(this);
     this.logic = new SimpleRecurrentLogic();
 }
예제 #5
0
 /// <summary>
 /// Construct a basic network with the specified logic.
 /// </summary>
 /// <param name="logic">The logic to use with this network.</param>
 public BasicNetwork(INeuralLogic logic)
 {
     this.structure = new NeuralStructure(this);
     this.logic     = logic;
 }
예제 #6
0
 /// <summary>
 /// Construct an empty neural network.
 /// </summary>
 public BasicNetwork()
 {
     this.structure = new NeuralStructure(this);
     this.logic     = new SimpleRecurrentLogic();
 }