예제 #1
0
        public void BiLayerCrossCountTest()
        {
            IEnumerable <Pair> pairs = new Pair[]
            {
                new Pair()
                {
                    First = 0, Second = 1, Weight = 2
                },
                new Pair()
                {
                    First = 0, Second = 2, Weight = 3
                },
                new Pair()
                {
                    First = 3, Second = 0, Weight = 2
                },
                new Pair()
                {
                    First = 3, Second = 1, Weight = 4
                },
                new Pair()
                {
                    First = 5, Second = 0, Weight = 3
                }
            };
            int firstLayerVertexCount  = 26;
            int secondLayerVertexCount = 3;
            int expected = 49;
            int actual   = LayoutUtil.BiLayerCrossCount(pairs, firstLayerVertexCount, secondLayerVertexCount);

            Assert.AreEqual(expected, actual);
        }