Exemplo n.º 1
0
        public void Creation()
        {
            var tools = new ConvolutionTools <float>();

            var smoother = new ElevationArraySmoother(tools, ConvolutionMaskSize.Mask3X3, NullInfillMode.NoInfill);

            smoother.Should().NotBeNull();
        }
Exemplo n.º 2
0
        public void Smooth()
        {
            var source = new float[10, 10];

            for (var i = 0; i < 10; i++)
            {
                for (var j = 0; j < 10; j++)
                {
                    source[i, j] = 10.0f;
                }
            }

            var tools    = new ConvolutionTools <float>();
            var smoother = new ElevationArraySmoother(tools, ConvolutionMaskSize.Mask3X3, NullInfillMode.NoInfill);

            var result = smoother.Smooth(source);

            result.Should().BeEquivalentTo(source);
        }