AIMA.Core.Logic.FOL.KB.Data.Chain.isEmpty C# (CSharp) Method

isEmpty() public method

public isEmpty ( ) : bool
return bool
        public bool isEmpty()
        {
            return literals.Count == 0;
        }

Usage Example

Beispiel #1
0
        public void testIsEmpty()
        {
            Chain c = new Chain();

            Assert.IsTrue(c.isEmpty());

            c.addLiteral(new Literal(new Predicate("P", new List<Term>())));

            Assert.IsFalse(c.isEmpty());

            List<Literal> lits = new List<Literal>();

            lits.Add(new Literal(new Predicate("P", new List<Term>())));

            c = new Chain(lits);

            Assert.IsFalse(c.isEmpty());
        }
All Usage Examples Of AIMA.Core.Logic.FOL.KB.Data.Chain::isEmpty