Exemple #1
0
        public void InfeasibleTerminalCount()
        {
            VFState state = CreateBenzeneToNaphthalene(AtomMatcher.CreateAnyMatcher(), BondMatcher.CreateAnyMatcher());

            Assert.IsTrue(state.Feasible(4, 4)); // 4, 4 is feasible
            state.Add(0, 0);
            state.Add(1, 1);
            state.Add(2, 2);
            state.Add(3, 3);
            Assert.IsFalse(state.Feasible(4, 4)); // 4, 4 is infeasible
        }
Exemple #2
0
        public void AddNonFeasible()
        {
            AbstractVFState state = new VFState(new int[4][], new int[6][], false);

            Assert.IsFalse(state.Add(0, 1));
            Assert.AreEqual(0, state.size);
            Assert.IsTrue(Compares.AreDeepEqual(
                              new int[] { UNMAPPED, UNMAPPED, UNMAPPED, UNMAPPED },
                              state.m1));
            Assert.IsTrue(Compares.AreDeepEqual(
                              new int[] { UNMAPPED, UNMAPPED, UNMAPPED, UNMAPPED, UNMAPPED, UNMAPPED },
                              state.m2));
            Assert.IsTrue(Compares.AreDeepEqual(
                              new int[] { 0, 0, 0, 0 },
                              state.t1));
            Assert.IsTrue(Compares.AreDeepEqual(
                              new int[] { 0, 0, 0, 0, 0, 0 },
                              state.t2));
        }