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); }
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); }