public void ComplexCyclic()
    {
        var connList = new LightweightList <WeightedDirectedConnection <double> >
        {
            new WeightedDirectedConnection <double>(0, 1, -2.0),
            new WeightedDirectedConnection <double>(0, 2, 1.0),
            new WeightedDirectedConnection <double>(1, 2, 1.0),
            new WeightedDirectedConnection <double>(2, 1, 1.0)
        };
        var connSpan = connList.AsSpan();

        // Create graph.
        var digraph = WeightedDirectedGraphBuilder <double> .Create(connSpan, 1, 1);

        // Create neural net and run tests.
        var actFn = new Logistic();
        var net   = new NeuralNetCyclic(digraph, actFn.Fn, 1);

        ComplexCyclic_Inner(net, actFn);

        // Create vectorized neural net and run tests.
        var vnet = new NeuralNets.Double.Vectorized.NeuralNetCyclic(digraph, actFn.Fn, 1);

        ComplexCyclic_Inner(vnet, actFn);
    }
        public void SingleInput_WeightOne()
        {
            var connList = new List <WeightedDirectedConnection <double> >
            {
                new WeightedDirectedConnection <double>(0, 1, 1.0)
            };

            // Create graph.
            var digraph = WeightedDirectedGraphBuilder <double> .Create(connList, 1, 1);

            // Create neural net and run tests.
            var actFn = new Logistic();
            var net   = new NeuralNetCyclic(digraph, actFn.Fn, 1);

            SingleInput_WeightOne_Inner(net, actFn);

            // Create vectorized neural net and run tests.
            var vnet = new NeuralNets.Double.Vectorized.NeuralNetCyclic(digraph, actFn.Fn, 1);

            SingleInput_WeightOne_Inner(vnet, actFn);
        }
        public void MultipleInputsOutputs()
        {
            var connList = new List <WeightedDirectedConnection <double> >
            {
                new WeightedDirectedConnection <double>(0, 5, 1.0),
                new WeightedDirectedConnection <double>(1, 3, 1.0),
                new WeightedDirectedConnection <double>(2, 4, 1.0)
            };

            // Create graph.
            var digraph = WeightedDirectedGraphBuilder <double> .Create(connList, 3, 3);

            // Create neural net and run tests.
            var actFn = new Logistic();
            var net   = new NeuralNetCyclic(digraph, actFn.Fn, 1);

            MultipleInputsOutputs_Inner(net, actFn);

            // Create neural net and run tests.
            var vnet = new NeuralNets.Double.Vectorized.NeuralNetCyclic(digraph, actFn.Fn, 1);

            MultipleInputsOutputs_Inner(vnet, actFn);
        }