예제 #1
0
        public void Test_Manhatten_Distance_Metric()
        {
            //arrange
            int[]             pixels1 = { -5, -6, -7 };
            int[]             pixels2 = { -1, 8, 7 };
            ManhattanDistance md      = new ManhattanDistance();
            //act
            var result = md.Between(pixels1, pixels2);

            //assert
            Assert.AreEqual(result, 32);
        }
        public void should_return_distance_between_images()
        {
            var image1 = new List <int> {
                1, 0, 1, 0
            };
            var image2 = new List <int> {
                1, 1, 0, 0
            };

            var result = distance.Between(image1, image2);

            result.Should().Be(2);
        }