AIMA.Core.Logic.FOL.KB.Data.Literal.isPositiveLiteral C# (CSharp) Method

isPositiveLiteral() public method

public isPositiveLiteral ( ) : bool
return bool
        public bool isPositiveLiteral()
        {
            return !negativeLiteral;
        }

Usage Example

Beispiel #1
0
        public void addLiteral(Literal literal)
        {
            if (isImmutable())
            {
                throw new InvalidOperationException(
                          "Clause is immutable, cannot be updated.");
            }
            int origSize = literals.Count;

            literals.Add(literal);
            if (literals.Count > origSize)
            {
                if (literal.isPositiveLiteral())
                {
                    positiveLiterals.Add(literal);
                }
                else
                {
                    negativeLiterals.Add(literal);
                }
            }
            recalculateIdentity();
        }
All Usage Examples Of AIMA.Core.Logic.FOL.KB.Data.Literal::isPositiveLiteral