AIMA.Core.Logic.Propositional.Algorithms.KnowledgeBase.getSentences C# (CSharp) Method

getSentences() public method

public getSentences ( ) : List
return List
        public List<Sentence> getSentences()
        {
            return sentences;
        }
    }

Usage Example

Example #1
0
        public bool plfcEntails(KnowledgeBase kb, Symbol q)
        {
            List<HornClause> hornClauses = asHornClauses(kb.getSentences());
            while (agenda.Count != 0)
            {
                Symbol p = agenda.Pop();
                while (!inferred(p))
                {
                    _inferred.Add(p, true);

                    for (int i = 0; i < hornClauses.Count; i++)
                    {
                        HornClause hornClause = hornClauses[i];
                        if (hornClause.premisesContainsSymbol(p))
                        {
                            decrementCount(hornClause);
                            if (countisZero(hornClause))
                            {
                                if (hornClause.head().Equals(q))
                                {
                                    return true;
                                }
                                else
                                {
                                    agenda.Push(hornClause.head());
                                }
                            }
                        }
                    }
                }
            }
            return false;
        }
All Usage Examples Of AIMA.Core.Logic.Propositional.Algorithms.KnowledgeBase::getSentences