static void Main(string[] args)
        {
            var neuron1 = new Neuron();
            var neuron2 = new Neuron();

            var neuronLayer1 = new NeuronLayer();
            var neuronLayer2 = new NeuronLayer();

            neuron1.ConnectTo(neuronLayer1);
            neuronLayer2.ConnectTo(neuronLayer1);
        }
Пример #2
0
        public static void Main(string[] args)
        {
            // unite Neuron and NeuronLayer in IEnumerable<Neuron> Composite Class
            // Add an Extension Method for IEnumerable<Neuron>
            // We will be able to connect a single node to the group of nodes (layer)
            var neuron1 = new Neuron();
            var neuron2 = new Neuron();

            neuron1.ConnectTo(neuron2);
            var layer1 = new NeuronLayer();
            var layer2 = new NeuronLayer();

            neuron1.ConnectTo(layer1);
            layer1.ConnectTo(neuron2);
        }