예제 #1
0
        private static void Min_Inner(UniformDistributionSampler sampler, int len)
        {
            // Alloc arrays and fill with uniform random noise.
            float[] a = new float[len];
            sampler.Sample(a);

            // Calc results and compare.
            float expected = PointwiseMin(a);
            float actual   = MathSpan.Min(a);

            Assert.Equal(expected, actual);
        }
예제 #2
0
        private static void Min_Inner(ISampler <int> sampler, int len)
        {
            // Alloc arrays and fill with uniform random noise.
            int[] a = new int[len];
            sampler.Sample(a);

            // Calc results and compare.
            int expected = PointwiseMin(a);
            int actual   = MathSpan.Min(a);

            Assert.Equal(expected, actual);
        }