Package net.sf.tweety.logics.pl.syntax
Class PlBeliefSet
- java.lang.Object
-
- net.sf.tweety.commons.BeliefSet<PlFormula,PlSignature>
-
- net.sf.tweety.logics.pl.syntax.PlBeliefSet
-
- All Implemented Interfaces:
Iterable<PlFormula>,Collection<PlFormula>,net.sf.tweety.commons.BeliefBase
public class PlBeliefSet extends net.sf.tweety.commons.BeliefSet<PlFormula,PlSignature>
This class represents a knowledge base of propositional formulae.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description PlBeliefSet()Creates a new (empty) knowledge base.PlBeliefSet(Collection<? extends PlFormula> formulas)Creates a new knowledge base with the given set of formulas.
-
Method Summary
Modifier and Type Method Description List<PlFormula>getCanonicalOrdering()Force ordering on belief set based on comparison of hash codes.PlSignaturegetMinimalSignature()Collection<PlBeliefSet>getSyntaxComponents()Returns the set of syntax components of this belief set, i.e.protected PlSignatureinstantiateSignature()ConjunctiontoCnf()This method returns this belief set in conjunctive normal form (CNF).-
Methods inherited from class net.sf.tweety.commons.BeliefSet
add, addAll, clear, contains, containsAll, equals, getSignature, hashCode, instantiateSet, isEmpty, iterator, remove, removeAll, retainAll, setSignature, size, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
PlBeliefSet
public PlBeliefSet()
Creates a new (empty) knowledge base.
-
PlBeliefSet
public PlBeliefSet(Collection<? extends PlFormula> formulas)
Creates a new knowledge base with the given set of formulas.- Parameters:
formulas- a set of formulas.
-
-
Method Detail
-
toCnf
public Conjunction toCnf()
This method returns this belief set in conjunctive normal form (CNF). A formula is in CNF iff it is a conjunction of disjunctions and in NNF.- Returns:
- the formula in CNF.
-
getSyntaxComponents
public Collection<PlBeliefSet> getSyntaxComponents()
Returns the set of syntax components of this belief set, i.e. a partitioning {K1,...,Kn} of K (a disjoint union K1u...uKn=K) such that the signatures of K1,...,Kn are pairwise disjoint.- Returns:
- the set of syntax components of this belief set
-
getCanonicalOrdering
public List<PlFormula> getCanonicalOrdering()
Force ordering on belief set based on comparison of hash codes.- Returns:
- list of "canonically" ordered formulas
- See Also:
PlBeliefSet.PlFormulaHashCodeComparator
-
getMinimalSignature
public PlSignature getMinimalSignature()
-
instantiateSignature
protected PlSignature instantiateSignature()
- Specified by:
instantiateSignaturein classnet.sf.tweety.commons.BeliefSet<PlFormula,PlSignature>
-
-