Exemple #1
0
        public void MinLastAxis()
        {
            // arrange
            const int NumElements = 6;
            var       targetData  = new double[NumElements];
            var       srcData     = new[] { -1.0, -0.6, -0.2, 0.2, 0.6, 1.0 };

            var target = new DataAndLayout <double>(targetData, new FastAccess(new Layout(new int[] { NumElements }, 0, new int[] { 1 })));
            var src    = new DataAndLayout <double>(srcData, new FastAccess(new Layout(new int[] { NumElements }, 0, new int[] { 1 })));

            // action
            ScalarOps.MinLastAxis(target, src);

            // assert
            Assert.AreEqual(-1, targetData[0]);
        }