示例#1
0
        /// <summary>
        /// Save created network
        /// </summary>
        /// <param name="rnetwork">current rnetwork</param>
        /// <param name="io_type">type of input and output</param>
        /// <param name="inputs">List of inputs</param>
        /// <param name="outputs">List of outputs</param>
        public void NewNetwork(Rnetwork rnetwork, Input_Output_Type io_type, List <Input> inputs, List <Output> outputs)
        {
            //todo: rnn dbmanager and save
            rlmDb.SaveNetwork(rnetwork, io_type, inputs, outputs);
            double r = 1.0;
            double s = 1.0;

            foreach (var input in inputs)
            {
                r *= input.Max;
            }

            rneuronsBoundedCapacity = Convert.ToInt32(r);

            foreach (var output in outputs)
            {
                s *= output.Max;
            }

            solutionsBoundedCapacity = Convert.ToInt32(s);
        }
        /// <summary>
        /// Save created network
        /// </summary>
        /// <param name="rnetwork">current rnetwork</param>
        /// <param name="io_type">type of input and output</param>
        /// <param name="inputs">List of inputs</param>
        /// <param name="outputs">List of outputs</param>
        public void NewNetwork(Rnetwork rnetwork, Input_Output_Type io_type, List <Input> inputs, List <Output> outputs)
        {
            //todo: rnn dbmanager and save
            rlmDb.SaveNetwork(rnetwork, io_type, inputs, outputs);
            double r = 1.0;
            double s = 1.0;

            foreach (var input in inputs)
            {
                r *= input.Max;
            }

            rneuronsBoundedCapacity = Convert.ToInt32(r);

            foreach (var output in outputs)
            {
                s *= output.Max;
            }

            solutionsBoundedCapacity = Convert.ToInt32(s);

            //Rneurons = new ConcurrentDictionary<long, Rneuron>(iConcurrencyLevel, rneuronsBoundedCapacity);
            //Solutions = new ConcurrentDictionary<long, Solution>(iConcurrencyLevel, solutionsBoundedCapacity);
        }