public PerceptronInfo AddLayer(LayerInfo neuron, int pos)
 {
     layers.Add(neuron);
     if (pos >= 0 && pos < layers.Count - 2)
     {
         MoveLayer(pos, layers.Count - 1);
     }
     return(this);
 }
        public static PerceptronInfo CreateClassicPerceptron(double minWeight, double maxWeight, params int[] net)
        {
            PerceptronInfo perceptron = new PerceptronInfo(minWeight, maxWeight);

            for (int l = 0; l < net.Length; l++)
            {
                LayerInfo layer = l < net.Length - 1 ?
                                  LayerInfo.CreateLayerWithBias :
                                  LayerInfo.CreateDefaultLayer;
                for (int n = 0; n < net[l]; n++)
                {
                    layer.AddNeuron(NeuronInfo.CreateDefaultNeuron);
                }
                perceptron.AddLayer(layer);
            }
            return(perceptron);
        }
 public PerceptronInfo AddLayer(LayerInfo layer)
 {
     layers.Add(layer);
     return(this);
 }