Beispiel #1
0
        public override void BuildSegment()
        {
            var Update    = new Update <T>(inputNodes[1]);
            var substract = new Subtract <T>(inputNodes[0], Update);
            var add       = new Add <T>(inputNodes[1], substract);
            var merge     = new Merge <T>(substract, add);

            outputNodes[0] = merge;
        }
Beispiel #2
0
        public override void BuildSegment()
        {
            var splitter  = new Split <T>(2, inputNodes[0]);
            var substract = new Subtract <T>(splitter[1], splitter[0]);
            var Update    = new Update <T>(substract);
            var add       = new Add <T>(splitter[0], Update);

            outputNodes[0] = add;
            outputNodes[1] = substract;
        }
Beispiel #3
0
        public override void BuildSegment()
        {
            var U = new UniversalNode <T>(
                (input, dataNumber) =>
            {
                var data1 = input[0].GetData(dataNumber - 1);
                var data2 = input[0].GetData(dataNumber);
                return((data1 + data2) / 4);
            }, inputNodes[1]);
            var substract = new Subtract <T>(inputNodes[0], U);
            var P         = new UniversalNode <T>(
                (input, dataNumber) =>
            {
                var data1 = input[0].GetData(dataNumber - 1);
                var data2 = input[0].GetData(dataNumber);
                return((data1 + data2) / 2);
            }, substract);
            var add   = new Add <T>(P, inputNodes[1]);
            var merge = new Merge <T>(substract, add);

            outputNodes[0] = merge;
        }