コード例 #1
0
        public void Merge_6()
        {
            var expected = new MembershipFunction();

            var sut = new SumMsfMergingStrategy();
            var result = sut.Apply(new MembershipFunction[] { });

            Assert.AreEqual(expected, result);
        }
コード例 #2
0
        public void Apply_5()
        {
            var msf1 = new MembershipFunction { { 1, 0.5 } };
            var msf2 = new MembershipFunction { { 1, 1 } };

            var expected = new MembershipFunction { { 1, 1.5 } };

            var sut = new SumMsfMergingStrategy();
            var result = sut.Apply(new[] { msf1, msf2 });

            Assert.AreEqual(expected, result);
        }
コード例 #3
0
        public void Merge_7()
        {
            var msf1 = new MembershipFunction { { 1, 1 } };
            var msf2 = new MembershipFunction();

            var sut = new SumMsfMergingStrategy();

            var result = sut.Apply(new [] { msf1, msf2 });
            Assert.AreEqual(msf1, result);

            result = sut.Apply(new[] { msf2, msf1 });
            Assert.AreEqual(msf1, result);
        }
コード例 #4
0
        public void ToStringTest()
        {
            var sut = new SumMsfMergingStrategy();

            Assert.AreEqual("Sum Msf Merge", sut.ToString());
        }