Class PlBeliefSet
java.lang.Object
org.tweetyproject.commons.BeliefSet<PlFormula,PlSignature>
org.tweetyproject.logics.pl.syntax.PlBeliefSet
- All Implemented Interfaces:
Iterable<PlFormula>
,Collection<PlFormula>
,BeliefBase
- Direct Known Subclasses:
CausalModel
,CompilationNode
,DeductiveKnowledgeBase
,KnowledgeBase
This class represents a knowledge base of propositional formulae.
- Author:
- Matthias Thimm
-
Field Summary
Fields inherited from class org.tweetyproject.commons.BeliefSet
EQUALS_USES_SIGNATURE
-
Constructor Summary
ConstructorDescriptionCreates 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 TypeMethodDescriptionForce ordering on belief set based on comparison of hash codes.Returns the signature of the language of this knowledge base.Returns the set of syntax components of this belief set, i.e.toCnf()
This method returns this belief set in conjunctive normal form (CNF).Methods inherited from class org.tweetyproject.commons.BeliefSet
add, add, addAll, clear, contains, containsAll, equals, getSignature, hashCode, isEmpty, iterator, remove, removeAll, retainAll, setSignature, size, toArray, toArray, toString, toString
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
PlBeliefSet
public PlBeliefSet()Creates a new (empty) knowledge base. -
PlBeliefSet
Creates a new knowledge base with the given set of formulas.- Parameters:
formulas
- a set of formulas.
-
-
Method Details
-
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
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
-
getMinimalSignature
Description copied from interface:BeliefBase
Returns the signature of the language of this knowledge base.- Returns:
- the signature of the language of this knowledge base.
-